Use embedded commands to apply backgrounds to PDF pages
Nice features of the Aloaha PDF Suite are the embedded commands. Embedded commands are written in the original document. When printed to Aloaha and converted to PDF they are being interpreted fully automatically.
The background command enables the user to specify on every page which background has to be rendered into the same page. To activate the background command please create a string value background in:
HKLM\Software\Aloaha\pdf or HKCU\Software\Aloaha\pdf
Aloaha will read this value only once at startup to save processing time. The content of this value should be a regular expression used to search the path to the background PDF. For example the value could be “Background:”.
Owner of the Aloaha PDF Suite Enterprise Edition are able to use this feature with the apply_letterheads_per_page API directly.
Please find a sample vbs script below
Dim workpdf ‘holds path to original pdf document
Dim targetpdf 'holds path to save the rendered PDF
Dim searchstring ‘regular expression to find on every page
Workpdf = “c:\test.pdf”
Targetpdf= “c:\test.pdf” ‘ Yes – source and target can be the same!
The registry key HKLM\Software\Aloaha\pdf\LayeredPDFLetterhead defines if only one or several PDF Layers are used. The key HKLM\Software\Aloaha\pdf\PDFLetterHeadLayer defines the PDF Layer to be used for the Letterhead.
Aloaha offers a couple of similar APIs. For example render PDF as backround on page X.
Should you require more information please do not hesitate to contact us.
Although we really tried hard, there are always questions left open.
Please send us your question. We would be glad to answer it.