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:”.

Please see also the registry dump below:

Windows Registry Editor Version 5.00


It is also possible to set additional the following key:


to instruct Aloaha to use the same background for all following pages!

Please note that the background command works only if no other letterhead is chosen from the Aloaha GUI AND the registry key Background is set!

Embedded commands can be written somewhere. The only condition is that the commandline is consistent in font and color.

Owner of the Aloaha PDF Suite Enterprise Edition are able to use this API directly.

Dim pdf
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!

Set pdf = createobject(“aloahapdf.edit”)

Call pdf. apply_letterheads_per_page(cstr(workpdf), cstr(targetpdf), cstr(searchstring))

Set pdf = nothing 

readme.pdf (188,22 KB) (196,52 KB)
PDF SignaturesAloaha PDF Suite General FAQPDF Printer Driver FAQPDF Digital Signature FAQHotfolder FAQPDF Autoprint FAQPDF Editor FAQAloaha PDF Suite ServerPFX FilesCitrix and Terminalserver FAQCluster EditionSettings TemplateCPU PriorityFAX FAQ64 Bit FAQPDF BackgroundsTweaksCustom Page SizeDynamic Time StampsAloaha PDF Saver/SignatorAloaha Multisignator FAQAloaha Card ConnectorPDF Crypter FAQTimestamping (RFC 3161)Translation EngineSecure PIN EntrySecure PIN CachingSmart CardsAloaha Smart Login