PDFCreate

Creates a PDF file from the specified source file.

Function Group Execution Windows Embedded Thin Client Mobile Access
PDFCreate File Synchronous Supported Not supported Supported Not supported

Syntax

Web Studio Help s2fr function file pdfcreate.xml d127834e76 PDFCreate
strSourceFile
String specifying the file path and name of the desired source file ( *.doc, *.txt, or *.rtf ). If a complete path is not specified, then the function will look for the source file in the project folder.
optStrPdfFile
Optional string specifying the file path and name of the created PDF file. If a file path is not specified, then the PDF file will be saved in the same location as the source file. If this parameter is omitted — that is, if no file path or name is specified at all — then the PDF file will be saved in the same location and with the same name as the source file. Only a new extension is added. For example, pathMyDocument.rtf becomes pathMyDocument.pdf.
Note: When entering the file name without a path, a leading backlash (““) is optional.

Returned value

Value Description
0 Success
1 Error in PDF profile information
3 Error saving PDF file
4 Job canceled
101 Error initializing PDF resource
102 Specified source file not found
103 Error generating PDF file
104 Wrong number of parameters
105 Wrong parameter type
Note: This function only supports the execution of one job at a time. If more than one user or command attempts to call the function at the same time, then the function will fail and return a value of 101.

Examples

Tag Name Expression
  PDFCreate( “C:Report1.rtf” )
  PDFCreate( “C:Report2.doc”, “C:Converted1.pdf” )
  PDFCreate( “C:Report3.txt”, “C:DataConverted1.pdf” )

PDFCreate