Lasso Soft Inc. > Home

[PDF_Serve]

The [PDF_Serve] tag serves a PDF file which is stored in a variable in place of the current Lasso format file. The name of the PDF file can be specified and, in supported browsers, the PDF file will be written to disk using that name and/or automatically opened in the visitor's PDF reader.

None of the contents of the current format file will be served. [PDF_Serve] completely rewrites the HTTP headers and contents of the served response. [PDF_Serve] also performs an [Abort] so no tags after [PDF_Serve] will be executed.

The first parameter to the tag should be a variable which contains the PDF file to be served. An optional -File parameter allows the name of the PDF file to be specified. An optional -Type parameter allows the MIME type of the served file (default 'application/pdf') to be overridden.

  • Syntax
  • Parameters
[PDF_Serve: 'PDF Data']

[PDF_Serve: 'PDF Data', -File='Example.PDF']

[Variable: 'myPDF' = (PDF_Doc: ...)]
...
[PDF_Serve: $myPDF, -File='Example.PDF']

[PDF_Serve: (File_Read: 'Example.PDF'), -File='Example.PDF']
Required Parameters
'File Data' The first parameter to the tag should be the PDF file data that will be served.
Optional Parameters
-File The -File parameter specifies the name of the PDF file. In supported browsers the downloaded PDF file will be given this name.
-Type The -Type parameter specifies the MIME type of the file. Defaults to application/pdf.
Examples

See the PDF chapter in the Lasso 8 Language Guide for examples of how to use this tag. Many of the PDF examples require lengthy descriptions and the use of several related tags and are better suited to presentation in the Language Guide. This tag is documented on page 559.

Tag Link [PDF_Serve] Category PDF
Type Process Data Source Any
Support Preferred Version 6.0
Output Type None Security File
Implementation LDML 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. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft