Parameter Parsing

If enabled, the PDF file will be parsed for parameters. These parameters can control the way pdfMachine works. This is useful for integration with legacy software to do "mail merge" type operations.

The parameter parsing is done using the "Perl-Compatible Regular Expressions" library developed by Philip Hazel. For a detailed explanation of regular expressions, please read http://home.att.net/~robertdunn/Papers/RegExpSyntax.html


The default regular expression used is:
#_ (\w+) ([^_]+)_#

This matches text such as:
#_ keyword the value _#

The first word can be any on the following list. Most are self explanatory. They match registry settings for pdfMachine. For more details, please read http://broadgun.com/pdfmachine/developer.htm

NextAction
SaveFilenameAction
DefaultSaveFilename
EmailTo
EmailCC
EmailBCC
pdfTemplateOrgPath
pdfTemplateEnable
pdfTemplateOnTop
pdfTemplate
watermark
watermarkFontName
watermarkFontSize
DocInfoEnable
DocInfoTitle
DocInfoAuthor
DocInfoSubject
DocInfoKeywords
DocInfoCreator
DocInfoProducer
DocInfoCreationDate
DocInfoModDate
DocName
UserConfirmAttachmentName
AutomatedMapiSend

eg. the following example would send an email to user@broadgun.com, with the attachment called "mypdf.pdf" and the subject "pdfMachine is great" and the body "Hi, Please have a look at the attachment." (spread over 2 lines).


#_ emailto user@broadgun.com _#

#_ emailsubject pdfMachine is great _#

#_ docname mypdf.pdf _#

#_ AutomatedMapiSend 0 _#

#_ Emailbody Hi,

Please have a look at the attachment. _#

#_ NextAction 3 _#