Output integration
The export process uses jadice flow to take the current collection state and merge the current documents into a single output document keeping the modifications like page reordering, render settings, annotations and more.
Export customization
Client side export features can be configured using the Helm properties provided under organizer.flow.export.*
(see deployment)
ℹ️ ADVANCED only
To access the full server side customization that flow provides, there are two configuration files that can be provided via helm parameters controller.config.workers
and controller.config.jobtemplates
(see additional configuration).
With these two YAML files you are able to modify the export using provided settings or fully customize the export process by replacing the entire process. For further information about this configuration please refer to the jadice flow documentation here.
These are the standard configurations for reference:
workers.yaml
workerDefinition:
- workerName: "fusionCollectionExport"
description: "Creates a single PDF export for a fusion collection"
processorClass: "com.jadice.flow.controller.server.processor.RemoteItemProcessor"
workerURL: "http://jf-worker-topdf"
infoTags:
- "ITEM_BASED"
- "IMAGE_PROCESSING"
- "REMOTE"
workerParameters:
- name: "pdfaConformanceLevel"
type: "com.jadice.flow.worker.topdf.settings.Conformance"
value: "PDF/A 2b"
description: "PDF-A conformance level"
- name: "isCollection"
type: "java.lang.String"
value: "\"true\""
description: "PDF export settings"
- name: "processingStepSettings"
type: "com.jadice.flow.worker.topdf.settings.ProcessingStepSettingsDTO"
value: "{\"repackingAllowed\":false,\"genericProcessingAllowed\":true,\"rasterizationAllowed\":true}"
description: "PDF export settings"
- name: "outputMode"
type: "com.jadice.flow.worker.topdf.settings.OutputMode"
value: "\"JOINED\""
description: "PDF export output mode"
jobtemplate.yaml
jobTemplate:
- jobName: "fusionCollectionExport"
description: "This worker exports documents and publishes them to the configured export targets."
enabled: true
stepTemplates:
- stepName: "fusionCollectionExport"
workerDefinitionName: "fusionCollectionExport"
inputMimeTypes: []
parameters:
- name: "pdfaConformanceLevel"
type: "com.jadice.flow.worker.topdf.settings.Conformance"
value: "\"PDFA2b\""
jobFlow:
- from: null
"on": "*"
to: "fusionCollectionExport"
For the job template to be recognized as the default export it has to be named fusionCollectionExport
. If you want to create an alternative export template, you can choose the template by providing the name with the intent export-intent
(see custom preprocessing and export).
Customization Example:
As a common example on how to reduce the export file size, you can use the imageDownsamplingResolutionPPI
setting to reduce the resolution of images embedded in the exported PDF.
For this you can add an entry to the parameters
property of the fusionCollectionExport
step.
100 PPI (Pixel Per Inch) is a recommended starting point to experiment with.
- name: "baseReshapeSettings"
type: "com.jadice.flow.worker.topdf.settings.BaseReshapeSettingsDTO"
value: "{\"pageSelection\":null,\"imageRepackingAllowed\":true,\"imageDownsamplingResolutionPPI\":100.0}"
Export result and notification
Output Organizer advanced generates Output documents conforming to the PDF/A-2b standard, while the basic variant has a reduced conformance level of PDF 1.7. The generated output is made available to the user via a https URL, other systems can be notified by the methods described in this article.
The URL at which the generated document can be accessed, is propagated in the UI. Downloading or forwarding the generated document may be sufficient for most use cases. Additionally, there are two more ways of receiving a result notification:
- Windows message
- REST notification
Notification via Window Message
A Window Message will be sent after successful export. Whenever Output Organizer is integrated into another page via iFrame, the "caller" can react accordingly to this message.
The JSON message format is as follows:
{
"app": "output-organizer",
"status": "success" | "error",
"collectionId": <collectionId>,
"timeStamp": <exportTime>,
"collectionMetadata": { ... },
"output": [
<exportUrl>
]
}
- app - identifies the message origin, in this case, hard-coded "output-organizer"
- status - successful or unsuccessful export; currently only "success" is notified
- collectionId - the id of the exported collection
- timeStamp - the date & time of export
- collectionMetadata - the complete metadata of the exported collection
- output[] - points to the location where the generated output document can be retrieved.
Because the collection metadata is freely modifiable, any additional info can be attached to the collection and then sent to the receiver of the window message.
Notification via REST
Also, you can configure a custom endpoint which will get notified after the export document has been generated.
The endpoint is called with a REST POST message providing information regarding the export that was just performed. The message format is identical to the window message described above.
In case you added proprietary metadata to your collection, this additional metadata will also be sent within the feedback message.
The endpoint can be configured
- either within each collection (preferred In case different endpoints should be notified for different collections).
- or via Helm
Endpoint configuration via collection
The notification endpoint can be set by adding an optional exportNotificationUrl
field to your collection metadata:
{
"id": <collectionId>,
"metadata": {
"exportNotificationUrl": <new>, // REST endpoint to notify (replaces feedbackUrl, which was used prior to version 1.0)
...
},
"elements": [
...
],
"typeId": "import-output"
}
Endpoint configuration via Helm
Alternatively, to configure an application-wide endpoint, it can be configured via Helm. This endpoint is used as a fallback, when a notification endpoint is not defined for an element.
! Please note: Only endpoints configured via Helm can be secured.
organizer.exportNotification.enabled | Flag to enable export notification (Default: false) |
---|---|
organizer.exportNotification.url | The url of the endpoint |
Authentication for notification endpoint
Instead of passing the authentication information as a parameter, a secret can be used as described here.
The export notification can be secured using basic authentication or a static bearer token. Authentication is optional and can be configured by adding these properties to your Helm deployment values:
organizer:
# used to notify an external service about the export
exportNotification:
enabled: false
# the url of the external service
url:
# the authentication method used to access the external service
auth:
basicAuthenticated:
enabled: false
username:
password:
bearerAuthenticated:
enabled: false
bearerToken:
Basic authentication
organizer.exportNotification.auth.basicAuthenticated.enabled - "true" to enable
organizer.exportNotification.auth.basicAuthenticated.username - authenticated technical user
organizer.exportNotification.auth.basicAuthenticated.password - corresponding password
Bearer authentication
organizer.exportNotification.auth.bearerAuthenticated.enabled - "true" to enable
organizer.exportNotification.auth.bearerAuthenticated.bearerToken - static bearer token
Choose one of the authentication methods by setting the enabled flag to "true" or omit both.