Creating and Editing Examples

Goal Create or edit an Example. Prerequisite knowledge Administrative Overview Types of Content Content Moderation and Approval Markdown Syntax Managing Translations Steps You can


Create or edit an Example.

Prerequisite knowledge


You can create a new Example by following the steps below, or edit an existing one by only editing some of the fields.

  1. In the administrative menu, go to Content > Add content > Example or find the Example you would like to edit as described in Finding Content.
  2. Fill in the form fields. See the table for fields and values below.
  3. Field nameExplanationExample value


    Select the language of your content (English, German, Japanese, Spanish, Portuguese-Brazil, French, Dutch). The content item will be displayed on the corresponding language version of the website. For more on language versions see Managing Translations



    The title of the Example.

    Font examples


    The copy of your content. You can select plain text, filtered HTML, full HTML or the default Markdown as text format.

    [copy of your content]

    Inline Images

    Browse and upload an image that you can then insert into the Body.

    [an image]


    Browse the files you'd like to add to the Example from you GitHub account.

    (see screenshot below)


    Add resources (e.g. fonts) that will be needed for your Example.

    (see screenshot below)

    Domain access options

    "Send to all affiliates" must always be selected. "Publish to" one must be selected - target audience for the site: customers (iText) OR developers (iText Developers).

    iText Developers


    Add any results that you think would help developers understand your Example.

    [result file]

    Menu settings

    Examples will be linked to from the Examples page, you don't have to put them in the menu.


    URL path settings

    The URL of the page. Generate automatic URL alias is enabled by default, usually there is no need to change it.


    Meta tags

    You can edit Page title, Description, Abstract, Keywords for SEO. Usually there is no need to change the default settings.


    Authoring information

    Change the author (Authored by) and publishing date (Authored on), if you are not editing your own content or would like to add a different date than the date of publication.


    Publishing options

    Add Moderation notes for reviewers and set the Moderation state of your content (Draft, Needs review or Published). To learn more about moderation states see Content Moderation and Approval.

    Needs review

  4. Click Preview to check what your Example will look like on the site. Click Save to create your Example or save your changes.

Examples can be anchored by inserting the following code: a name="unique-file-name">File name/a>

Guidelines for anchors:

  1. Each file name must have a unique identifier (name attribute) otherwise it would be possible that 2 or more files would have the same name attribute on the same page (if their original names are the same) and the name attributes would conflict. To solve this possible problem we prefixed each file name attribute with the file's unique identifier which is stored by Drupal. So if the file name is "" then its anchor reference will be "" if the file's unique id is 1.

  2. It is possible that file names include white spaces or other special characters, therefore file name attributes will be "cleared" and lowercased for a better (more valid) URL. For example if the file name is "My file n@me contains s&ec)a/ word1_word2 chara$ers.pdf" then its name attribute will be "1-my-file-nme-contains-seca-word1_word2-charaers.pdf" (if the file's unique id is 1). The dot and the "_" character won't be removed, spaces will be converted to "-" characters and special characters will be removed. According to this the file will be referenceable with the "#1-my-file-nme-contains-seca-word1_word2-charaers.pdf" anchor in the browser's address bar.

Ready to use iText?

Try our iText 7 Library and add-ons FREE for 30 days. Test your proof of concept, and see if our solution is right for you.

Get my FREE trial

Still have questions? 

We're happy to answer your questions. Reach out to us and we'll get back to you shortly.

Contact us
Stay updated

Join 11,000+ subscribers and become an iText PDF expert by staying up to date with our new products, updates, tips, technical solutions and happenings.

Subscribe Now