pdf » saveAsPdf(profile,content,file)
Description
This command saves the specified content
as a PDF file (denoted as file
). One can utilize the profile
parameter
to customize various output setting for the PDF generation. Suppose the intended profile is named as pdfOutput
. We
can have the following set of output configurations:
[profile].pagesize
- specify the page size of the target PDF file.- One may use common page sizes such as
LETTER
,LEGAL
,LEDGER
,TABLOID
,POSTCARD
,A0
,A1
,A2
,A3
,A4
,A5
,A6
, etc., or specify a custom page size in the format<inches>x<inches>
. - For example,
11x8.5
would instruct Nexial to create a landscape-oriented, Letter-sized PDF (normal portrait Letter size is8.5x11
).
- One may use common page sizes such as
[profile].monospaced
- indicate whether Nexial should output the specified content in fixed width font (e.g. Courier). Default isfalse
.- generally speaking, one would set this configuration to
true
when the intent is to generate thecontent
as “source code”. For HTML content, set this configuration tofalse
.
- generally speaking, one would set this configuration to
[profile].title
- specify the title of the generated PDF. This metadata would appear under the Properties tab of the generated PDF (see example). This configuration is optional.[profile].subject
- specify the subject of the generated PDF. This metadata would appear under the Properties tab of the generated PDF (see example). This configuration is optional.[profile].author
- specify the author of the generated PDF. This metadata would appear under the Properties tab of the generated PDF (see example). By default, this will reflect the User ID that executed the corresponding Nexial automation.[profile].keywords
- specify the keywords of the generated PDF. This metadata would appear under the Properties tab of the generated PDF (see example). This configuration is optional.[profile].custom.*
- specify additional custom metadata for the generated PDF. This metadata would appear under the Custom tab of the generated PDF (see example).
Parameters
- profile - the profile name of the intended output configuration.
- content - the content to be generated on the PDF
- pdf - the PDF file to process
Example
Script:
Datasheet:
The generated PDF and the generated metadata: