Howto set PDF-"Document Information" properties when exporting

4 posts, 1 answers
  1. Mi
    Mi avatar
    16 posts
    Member since:
    Apr 2011

    Posted 01 Jul 2012 Link to this post


    I need to set some document information keys of an exported PDF-file.

    In an exported PDF-file, all I can see are some hardcoded(?) properties like Producer="Telerik RadRichTextBox" and Creator.

    How can I set Title, Subject, Keywords, Creator and Author of the exported PDF-File?

  2. Answer
    Kammen avatar
    312 posts

    Posted 04 Jul 2012 Link to this post

    Hi Mi,
    Unfortunately these are hard-coded in the current version. We, however, decided to expose such settings in PdfExportSettings class through DocumentInfo property. The new property will be available in the next LIB (Latest Internal Build), expected next week, and will be officially included in 2012 Q2 SP1, expected in late July.
    How to change the default PdfExportSettings can be found in this help article.

    We have added points to your account for the suggestions. Don't hesitate to contact us if you have other questions.

    Kind regards,

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 05 Jul 2012 Link to this post

    Are document properties available for the XAML documents? Or is this still to come?

    For example, I would like to be able to record a document version type. As my current project expands and I add more features to the RadRichTextBox, I will need some way to determine if the document being Imported was created as a version 1, 2 or 3 etc.

  4. Mihail
    Mihail avatar
    223 posts

    Posted 10 Jul 2012 Link to this post

    Hello Rob,

    RadDocument does not have such document properties, as such properties are not directly related to the implementation of RadRichTextBox, but to the specific use of the control. Logically, this information does not belong to the document and had better be saved somewhere else.

    For example, if you are saving the documents in a database, what you can do is to add a field to store this information. In case you are saving the documents as files, this meta data can be included in the name of the file or even in the path where you store the document.

    Having said that, if you still believe that the document is the right place to include such metadata, there is a way to add this information to the document. You could use the DocumentVariables property of RadDocument like this:

    this.editor.Document.DocumentVariables.Add("DocumentVersion", 5);

    This property will be exported like this:
      <t:DocumentVariableInfo Name="DocumentVersion" Value="5" />

    and after import, its value can be retrieved as follows:

     I hope this answers your question.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top