Help / WLanguage / WLanguage functions / Standard functions / PDF functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Saves the content of a pdfDocument variable in a".PDF" file.
MyPDF is pdfDocument = "Test.pdf"
FOR EACH DocumentPage OF MyPDF.Page
PDFSave(MyPDF, "passwordtest.pdf")
<Result> = PDFSave(<PDF to save> , <Name and path of the PDF file> [, <Quality>] [, <Password>])
<Result>: Boolean
  • True if saved successfully,
  • False otherwise. To get more details on the error, use ErrorInfo.
<PDF to save>: pdfDocument variable
Name of the pdfDocument variable that corresponds to the PDF document to save.
<Name and path of the PDF file>: Character string
Name and full (or relative) path of PDF file to create.
<Quality>: Optional Integer constant
Configures the compression level of colors and grayscale.
iAutomaticQualityCompression level automatically calculated to generate a better-quality PDF file (especially for images).
Linux This constant is not available.
iAverageQualityAverage compression level.
Linux This constant is not available.
iHighQualityLow compression level used to get a high quality for the generated PDF.
Linux This constant is not available.
iLowQualityHigh compression level.
Linux This constant is not available.
iMaximumQualityMinimum compression level to get a maximum quality. This constant is recommended when creating a PDF file intended to be printed.
Linux This constant is not available.
iMinimumQualityMaximum compression level. The quality will be minimum. This constant can be used to create a PDF file intended to be viewed on the screen.
Linux This constant is not available.
<Password>: Optional character string
New password to open the PDF file.
  • If this parameter corresponds to an empty string (""), the PDF document will have no password.
  • If this parameter is not specified, the PDF document will keep its password if it has one.
AndroidAndroid Widget iPhone/iPad This parameter is not available.
AndroidAndroid Widget Starting with version 28, this function is not supported by 32-bit ARM processors. New PDF features require a 64-bit execution mode.
If an application is to be run on devices with 32-bit ARM processors, it must be generated with WINDEV Mobile 27.
Related Examples:
PDFDocument type Unit examples (WINDEV): PDFDocument type
[ + ] This example shows how to use the pdfDocument WLanguage type.
This type is used to handle PDF files by programming.
You can:
- Retrieve the details of the PDF file (Created, Modified, Author, etc.)
- Retrieve the text of the PDF file (page by page and line by line)
- List / Add / Delete attachments
Business / UI classification: Business Logic
Component: wd290wdpdf.dll
Minimum version required
  • Version 25
This page is also available for…
Click [Add] to post a comment

Last update: 12/15/2023

Send a report | Local help