[Solved] Use the Output Creation preset to add additional metadata to the PDF

I would like to add additional information to any generated PDF and to do this I can use the Output Creation preset for this (PDF Options - Metadata).
What I would like to do is to insert values from the Workflow (e.g. a specific company) but I have no idea how to specify this. The manual is also not clear about this.
Can someone maybe give me some examples how I could do this?

You cannot pass runtime parameters directly to an output preset (yet!), but you can pass them to the Job Creation operation. You have to make sure that the Job Preset stores in its metadata the values it received in the parameters. You can then use those metadata fields in your output preset.

Source: REST API - passing variables to output preset

Let’s say that you would like to parse a Workflow variable to the Addition Content feature available in the Output Preset. For this scenario you can execute steps similar to the following one:

  1. Open the Designer application

Job Preset

  1. Open a Job Preset or create a new one
  2. Make sure that the options Runtime Parameters and Include meta data are checked on the Job Preset page once the Job Creation wizard is loaded
  3. Add a Runtime Parameter on the Runtime Parameter Options page by clicking on the Add button1
  4. Add a meta data tag in the desired Tags tab on the Meta Data Options page.
  5. Click on the Add meta data button1 and select the option Add runtime parameter meta data in the desired Tags tab.
  6. Select the Runtime Parameter added by step 3 once the Runtime Parameter Selection window is loaded and click on OK
  7. Click on Finish to save the Job Preset

Output Preset

  1. Open a Output Preset or create a new one
  2. Make sure that the option Add additional content is checked and that the previously saved Job Preset has been selected on the Output Preset page
  3. Click on the Add button1 on the Additional Content page and select the option Text
  4. Click on the Add button1 on the right side of the Text field once the Additional Text window is loaded and select the option Document meta data field
  5. Select the field created by step 4 (and 5) once the Field Name window is loaded and click on OK. A value like ${document.metadata.FieldName} will be added to the Text field
  6. Click on Finish to save the Output Preset

Workflow

  1. Send both the Job- and Output Preset to Workflow
  2. When you apply the Job Preset to the Create Job task you will notice that you can now apply a Workflow variable to the Runtime Parameter created added step 4.

1This button looks like this:
add-button_20240730

I’m sorry for misreading your forum post. Step 8 until 13 are NOT for adding data to the PDF metadata fields but for adding content to pages by a Output Preset.

In order to parse the value of a Workflow variable to the PDF Metadata fields Title, Author, Description and Keywords you will have to make sure that:

  1. The option Separation has also been checked on the Job Preset page once the Job Creation wizard is loaded
  2. The separation is set to the same metadata level as the level on which the Runtime Parameter is set by step 4, 5 and 6
  3. Insert one of the following values in the one of the PDF Metadata fields whereby “FieldName” is equal to the name of the Runtime Parameter set by step 4, 5 and 6
    Metadata Level Syntax
    Document ${document.metadata.FieldName}
    Document Set ${set.metadata.FieldName}
    Job Segment ${segment.metadata.FieldName}

I am still unable to get this working.

Job Creation Preset:

  • Options selected: Runtime Parameters, Include meta data
  • Data mapper selected
  • Next
  • Added parameter with the same name (also same case) as I have added in the Workflow
  • For the Meta Data Options I have added the Author to the Document Tags list as a Parameter
  • Finish + Save

Output Preset:

  • Options selected: Separation
  • Job Preset selected
  • Next
  • Print Options not necessary so pressed Next
  • Separation Settings: Document
  • Next
  • Metadata: Author: ${document.metadata.Author}

In my All-in-one plugin I have played with the Output Management which I had set to: Through Workflow but I also tried it with: As defined by Output Preset.

None of these settings make a difference as the resulting PDF has empty meta data fields (except for the Title).

I assume that you have inserted the Workflow variable in the correct Value field in the Runtime Parameters section of the Job Preset tab1?

1Properties window > Job Preset tab > Runtime Parameters section

It is added at the Content Creation tab but for the Job Creation tab I am unable to add anything when I select the jobpreset that I need. If I select %o as the File Name I am able to add a Runtime Parameter.
I tried to change the %o to %2 and then set the name of the Job preset file in this variable but then the Author field in the PDF is still empty.
Do note that I also tried to use a field from the datamapper. In the Job preset file I can then Select this field at the Meta Data Options with Source Type = Field. Unfortunately this also does not work.

Can you please check the the following OL Connect Package1 and see what the difference is?

example.OL-package (41.4 KB)

Adding Runtime Parameters to the Runtime Parameters section in the Job Creation tab of the All in One Workflow plugin should not be required when they are added in the Job Preset.

I’ve created a very basic example and I’m getting the expected result as output.

My Workflow looks like this:

screenshot-workflow_20240731

The settings as applied in the Job Creation tab looks like this:

1Created in OL Connect Enterprise version 2024.1.1

Interesting as this is not what I see with the same version (2024.1.1) in my workflow. Here is a screenshot of my all-in-one:

Can you please share the Job Preset you have applied in the Job Creation tab of the All in One Workflow plugin?

I will share the information in the support ticket that has been created for this item. Do note that I get these greyed out settings for all job presets, except when I use the Dynamic option, which is the only one where the + and the x becomes available.

Thank you for your support Marten.
It seems the issue was that I forgot to upload the changed job preset and output preset after I made the changes so the Workflow was still working with the old settings.

1 Like