ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • Preview of PDF print
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Prints the content:
  • of a PDF file.
  • WINDEV of a buffer containing a PDF.
  • WINDEV of a PDF Reader control.
What is the print destination?
Example
IF iPrintPDF("MonFichier.PDF") THEN
	Info("Impression réussie")
END
WINDEV
// Impression d'un buffer
MonBufferPDF is Buffer
MonBufferPDF = fLoadBuffer("C:\temp\Monfichier.pdf")
IF iPrintPDF(MonBufferPDF) THEN
	Info("Impression réussie")
END
Syntax

Printing a PDF file Hide the details

<Result> = iPrintPDF(<Name of PDF file> [, <Password> [, <Sizing> [, <List of pages>]]])
<Result>: Boolean
  • True if printed successfully,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Name of PDF file>: Character string
Name and path of PDF file to print. This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Reminder: On iPhone or iPad, an application has the rights to write to its installation directory or one of its subdirectories
<Password>: Character string or Secret string
  • Password for opening the PDF file,
  • Empty string ("") if the file has no password.
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
<Sizing>: Integer constant
Print size:
iHomotheticHomothetic enlargement or reduction of the PDF document pages to adapt them to the output format, ignoring physical margins.
This constant corresponds to the option "Fit to paper size" available in PDF printing software.
iHomotheticWithoutGrowthHomothetic reduction of the PDF document pages to adapt them to the output format, ignoring physical margins. Pages with a smaller format keep their format and are centered.
This constant corresponds to the option "Shrink to fit paper size" available in PDF printing software.
iHomotheticNoEnlargementPrintableAreaHomothetic reduction of the PDF document pages to adapt them to the output format, taking into account physical margins. Pages with a smaller format keep their format and are centered.
This constant corresponds to the option "Fit to printer margins" available in PDF printing software.
Note: In previous versions, this constant was called iHomotheticNoEnlargementPrintableZone.
iRealSizePrint in real size. The pages that use a format:
  • smaller than the output format are centered in the page.
  • bigger than the output format are truncated and are centered in the page.

<List of pages>: Character string
List of pages to print. You have the ability to specify the range of pages to print separated by a comma, each range being in 'X-Y' format where X and Y are numbers of pages.
WINDEVUser code (UMC)

Printing a buffer corresponding to a PDF file Hide the details

<Result> = iPrintPDF(<Buffer name> [, <Password> [, <Sizing> [, <List of pages>]]])
<Result>: Boolean
  • True if printed successfully,
  • False otherwise.
<Buffer name>: Buffer
Name of Buffer variable corresponding to the PDF file to print.
<Password>: Character string or Secret string
  • Password for opening the PDF file,
  • Empty string ("") if the file has no password.
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
<Sizing>: Integer constant
Print size:
iHomotheticHomothetic enlargement or reduction of the PDF document pages to adapt them to the output format, ignoring physical margins.
This constant corresponds to the option "Fit to paper size" available in PDF printing software.
iHomotheticWithoutGrowthHomothetic reduction of the PDF document pages to adapt them to the output format, ignoring physical margins. Pages with a smaller format keep their format and are centered.
This constant corresponds to the option "Shrink to fit paper size" available in PDF printing software.
iHomotheticNoEnlargementPrintableAreaHomothetic reduction of the PDF document pages to adapt them to the output format, taking into account physical margins. Pages with a smaller format keep their format and are centered.
This constant corresponds to the option "Fit to printer margins" available in PDF printing software.
Note: In previous versions, this constant was called iHomotheticNoEnlargementPrintableZone.
iRealSizePrint in real size. The pages that use a format:
  • smaller than the output format are centered in the page.
  • bigger than the output format are truncated and are centered in the page.

<List of pages>: Character string
List of pages to print. You have the ability to specify the range of pages to print separated by a comma, each range being in 'X-Y' format where X and Y are numbers of pages.
WINDEVUser code (UMC)

Printing the content of a PDF Reader control Hide the details

<Result> = iPrintPDF(<PDF Reader control> [, <Sizing> [, <List of pages>]])
<Result>: Boolean
  • True if printed successfully,
  • False otherwise.
<PDF Reader control>: Character string
Name of PDF Reader control displaying the PDF file to print
<Sizing>: Integer constant
Print size:
iHomotheticHomothetic enlargement or reduction of the PDF document pages to adapt them to the output format, ignoring physical margins.
This constant corresponds to the option "Fit to paper size" available in PDF printing software.
iHomotheticWithoutGrowthHomothetic reduction of the PDF document pages to adapt them to the output format, ignoring physical margins. Pages with a smaller format keep their format and are centered.
This constant corresponds to the option "Shrink to fit paper size" available in PDF printing software.
iHomotheticNoEnlargementPrintableAreaHomothetic reduction of the PDF document pages to adapt them to the output format, taking into account physical margins. Pages with a smaller format keep their format and are centered.
This constant corresponds to the option "Fit to printer margins" available in PDF printing software.
Note: In previous versions, this constant was called iHomotheticNoEnlargementPrintableZone.
iRealSizePrint in real size. The pages that use a format:
  • smaller than the output format are centered in the page.
  • bigger than the output format are truncated and are centered in the page.

<List of pages>: Character string
List of pages to print. You have the ability to specify the range of pages to print separated by a comma, each range being in 'X-Y' format where X and Y are numbers of pages.
Remarks
WINDEV

Preview of PDF print

The PDF file to print can be displayed in the report viewer. Simply use function iDestination with constant iVisualizer before function iPrintPDF.
For example:
// Imprime le PDF dans le visualisateur de rapports
iDestination(iViewer)
iPrintPDF("c:\tmp\Convention.pdf")
Business / UI classification: Neutral code
Component: wd300etatexe.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/16/2025

Send a report | Local help