Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

PDFCreate

  • Last UpdatedOct 29, 2026
  • 2 minute read

Creates a PDF file from the specified source file.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

PDFCreate

File

Synchronous

No

Supported

Not supported

Not supported

Supported

Not supported

Syntax

PDFCreate (strSourceFile { | ,optStrPdfFile })

strSourceFile

String specifying the file path and name of the desired source file ( *.doc, *.txt, or *.rtf ). If a file path is not specified, the function will look for the source file in the project folder.

Note: Follow the conventions of the target platform for the file path and name, and separators. For example, a file path in Windows starts with a drive letter and uses backward slashes as separators (C:\path\to\file), while a file path in Linux starts at the root directory and uses forward slashes as separators (/path/to/file).

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, C:\path\to\MyDocument.rtf becomes C:\path\to\MyDocument.pdf.

Note: Follow the conventions of the target platform for the file path and name, and separators. For example, a file path in Windows starts with a drive letter and uses backward slashes as separators (C:\path\to\file), while a file path in Linux starts at the root directory and uses forward slashes as separators (/path/to/file).

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:\Data\Converted1.pdf" )

In This Topic
Related Links