PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV, WEBDEV and WINDEV Mobile 27 feature!
  • Properties specific to the description of pdfParameter variables
  • WLanguage functions that use pdfParameter variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
pdfParameter (Type of variable)
In french: pdfParamètre
The pdfParameter type is used to define all the characteristics of a PDF file to be generated. The characteristics of this PDF file can be defined and modified using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Display two full pages with scrolling and cover page
Params is pdfParameter
Params.Quality = iHighQuality
Params.Zoom = zoomFullWidth
Params.PageDisplayMode = dispTwoPage + dispEnableScrolling + dispWithCoverPage
iParameterPDF(Params)
iDestination(iGenericPDF)
iPrintReport(MyReport)
 
ShellExecute(iLastFile())
// Display a page with scrolling and set zoom to content
param is pdfParameter
param.Zoom = zoomFitVisible
param.PageDisplayMode = dispSinglePage + dispEnableScrolling
iParameterPDF(param)
iDestination(iGenericPDF, gsPDFName)
iPrintReport(RPT_Database)
 
ShellExecute(gsPDFName)
// Set page zoom to 100% and enable scrolling
param is pdfParameter
param.Zoom = 100
param.PageDisplayMode = dispEnableScrolling
iParameterPDF(param)
iDestination(iGenericPDF, gsPDFName)
iPrintReport(RPT_Database)
 
ShellExecute(gsPDFName)
Remarks

Properties specific to the description of pdfParameter variables

The following properties can be used to manage the settings of a PDF file:
Property nameType usedEffect
PageDisplayModeInteger constantPage display mode in the PDF reader. Corresponds to a combination of the following constants:
  • dispWithCoverPage: Sets the first page of the PDF file as cover page. The first page is displayed on the right when viewing in 2-page mode.
  • dispEnableScrolling: Display with progressive scrolling: Displays pages in an uninterrupted vertical column occupying the width of one page. Scrolling can be enabled for both 1-page and 2-page display modes.
  • dispDefault (Default value): Default display.
  • dispTwoPage: Display two pages side by side in the PDF reader.
  • dispSinglePage: Display one page of the PDF file at a time in the PDF reader. Margins are not displayed.
ColorFormatInteger constantColor management in the PDF file:
  • pdfColor: Create a color PDF file.
  • pdfGrayscale: Create a black and white PDF file.
ModificationPasswordCharacter stringPassword used to allow a user to change properties of the PDF file.
OpeningPasswordCharacter stringPassword required to open the PDF file.
ProtectionInteger constantsProtection options for the generated PDF file. Corresponds to the combination of the following constants:
  • Format options:
    • iPDFA or iPDFA1b: PDF in PDF/A-1b format. All the elements required to display or to print the PDF file are included in the generated file. Therefore, the generated file is bigger.
      Remark: This format involves some limitations:
      • Transparency of images not supported.
      • OpenType fonts not supported.
      • Use of integrable fonts.
    • iPDFA3b: PDF in PDF/A-3b format. All the elements required to display or to print the PDF file are included in the generated file. Therefore, the generated file is bigger. It is possible to add XML, CSV, word processing, spreadsheet files, ... in PDF format.
      Remark: This format involves some limitations:
      • Transparency of images not supported.
      • OpenType fonts not supported.
      • Use of integrable fonts.
  • Protection options:
    • iProtectionNone: No protection for the PDF file.
    • iProtectionComment: Protection against the addition or modification of comments.
    • iProtectionPrinting: The PDF file cannot be printed.
    • iProtectionModification: The content of PDF file cannot be modified.
    • iProtectionSelection: The content of PDF file cannot be copied or extracted from the file.
QualityInteger constantQuality of compression for the colors and grayscale:
  • iAutomaticQuality: Automatically calculated quality.
  • iHighQuality: High compression quality.
  • iLowQuality: Low compression quality.
  • iMaximumQuality: Maximum compression quality.
  • iMinimumQuality: Minimum compression quality.
  • iAverageQuality: Average compression quality.
BookmarkBoolean
  • True if bookmarks are to be included in the PDF file. A bookmark is automatically defined for each page in the PDF file. Each bookmark is named "Page <page number>" ("Page 1" for example).
  • False otherwise.
UnicodeBoolean
  • True if the PDF file contains Unicode characters,
  • False otherwise.
VersionInteger constantVersion of the generated PDF:
  • iPDF14: File generated using PDF 1.4
  • iPDF15: File generated using PDF 1.5
  • iPDF16: File generated using PDF 1.6
  • iPDF17: File generated using PDF 1.7
ZoomInteger or Integer constantDefault zoom when the PDF file is opened:
  • Zoom value between 25% and 6400%,
  • zoomFitVisible: Zoom to display the page so that the text and images occupy the entire width of the view.
  • zoomDefault: Default zoom.
  • zoomFullPage: Zoom to display the whole page.
  • zoomFullHeight: Zoom to display the entire vertical space of the page.
  • zoomFullWidth: Zoom to display the entire horizontal space of the page.
  • zoomActualSize: Zoom at 100%.

WLanguage functions that use pdfParameter variables

Versions 09 and later
iParameterPDF
New in version 09
iParameterPDF
iParameterPDF
Defines the options for the generated PDF file.
Versions 27 and later
PDFAddImage
New in version 27
PDFAddImage
PDFAddImage
Adds an image to a page in an existing PDF file.
Versions 27 and later
PDFAddWatermark
New in version 27
PDFAddWatermark
PDFAddWatermark
Adds a watermark to all or some pages of an existing PDF file.
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment