Initializes and creates a PDF document. Uses optional parameters to set the basic specifications of the file to be created. Data is added to the variable using [PDF_Doc] member tags.
[Var_Set:'MyFile'=(PDF_Doc: -File='MyFile.pdf',
-Format='PDF',
-Size='A4',
-Color='#000000',
-Margins=(1.0, 1.0, 3.0, 3.0),
-UseDate,
-NoCompress,
-PageNo=1,
'Author'='John Doe',
'Title'='My PDF File')]
PDF files are created by setting a variable as a [PDF_Doc] type, and using various member tags and other [PDF_...] tags to add data to the variable. The PDF is then written to file when the format file containing all code is served by the Web server
[Var:'MyFile'=(PDF_Doc:
-File='MyFile.pdf',
-Format='PDF',
-Size='A4',
-Margin=(Array: 144.0, 144.0, 72.0, 72.0))]
[Var: 'MyFont'=(PDF_Font: -Face='Helvetica', -Color='#00FF00',
-Size=24)]
[$MyFile->(AddText:'Hello, World\n', -Font=$MyFont)]
[$MyFile->(AddText:'I am a PDF document', -Font$MyFont)]
[$MyFile->(Close)]
PDF file named MyFile.pdf in the same folder as the [PDF_Doc] format file (Windows), or a PDF file named MyFile.pdf in the root file permission folder of the current user (Mac OS X).
Tag Link | [PDF_Doc] | Category | |
---|---|---|---|
Type | Substitution | Data Source | Any |
Support | Preferred | Version | 6.0 |
Output Type | PDF File | Security | File |
Implementation | LJAPI | Sets | Lasso 6.0 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft