PDF transformation (-PDF) command
The -PDF command allows the map to transform map data in XML format to PDF data using the GET map rule. PUT receives map data in XML format and transforms it to formatted PDF data. This command allows the same with GET, so that it can return PDF data back to the map, by performing in-memory transformation. The XML format data must conform to the PDF importer generated, native XML schema for the corresponding PDF document
This command is useful in environments where file system access is restricted to the users, and PDF transformations must be performed in memory and then the transformed output to be returned to the map for further processing. A stream of PDF data is passed to the map with GET:
=GET("PDF","-PDF -NAMES memory://<names-document-id> -TEMPLATE memory://<template-document-id>",<xml-map-data>)
- template-document-id=GET("PDF","-ADOC",<template-file-data-as-stream>) or =GET("PDF","-ADOC <my-template-documentid>",<template-file-data-as-stream>)
- names-document-id=GET("PDF","-ADOC",<names-file-data-as-stream>) or =GET("PDF","-ADOC <my-names-documentid>",<names-file-data-as-stream>)
- pdf-data-out=GET("PDF,"-PDF -NAMES memory://<names-document-id> -TEMPLATE memory://<template-document-id>",<xml-map-data>)
If you have to specify -SCHEMA (or -S), then you can do the same for the schema files.
Store output document in memory
- =PUT("PDF","-URL memory://<my-output-doc-id> -NAMES memory://<names-document-id> -TEMPLATE memory://<template-document-id>",<xml-map-data>) or the adapter command line can be used with the output card.
- pdf-data-out=GET("PDF","-GDOC <my-output-doc-id>")
Default File URL
It is required to specify memory:// for memory documents, http:// for remote documents, or file:/// for local file system documents using the -URL (-U), -NAMES (-N), -SCHEMA (-S) and -TEMPLATE (-P) commands.
Reference XML data
-URL memory://<xml-data-document-id> can be specified. XML data is in memory and can be referenced instead of passing map data as a third parameter of GET. The third parameter has precedence over the -URL option.