ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / PDF functions
  • Properties specific to pdfPage 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
The pdfPage type is used to define all the advanced characteristics of a page from a PDF document loaded in memory. The characteristics of this page can be defined and changed 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
MonPDF is pdfDocument = "test.pdf"
FOR EACH PageDocument OF MonPDF.Page
Trace(PageDocument.Hauteur)
END
PDFSave(MonPDF, "testmdp.pdf")
// Il est également possible d'utiliser la syntaxe préfixée
// MonPDF.Sauve("testmdp.pdf")
MonDocPDF is pdfDocument = PDFOpen("C:\temp\Monguide.pdf")
Trace(MonDocPDF.PDFVersion)
Trace(MonDocPDF.Author)
Trace(MonDocPDF.Page.Occurrence)
Trace(MonDocPDF.Page[1].Largeur)
Trace(MonDocPDF.Page[36].Hauteur)
FOR EACH UnElémentTexte OF MonDocPDF.Page[2].ElémentTexte
Trace(UnElémentTexte.Texte + " X = " +
UnElémentTexte.X + " Y = " + UnElémentTexte.Y + " L = " +
UnElémentTexte.Largeur + " H = " + UnElémentTexte.Hauteur)
END
MonDocPDF2 is pdfDocument = "C:\temp\plan.pdf"
// Ajout de pages
Add(MonDocPDF2.Page, MonDocPDF.Page[5])
// Insertion de pages
Insert(MonDocPDF2.Page, 1, MonDocPDF.Page[32])
// Enregistrement du PDF modifié
PDFSave(MonDocPDF2, "MonDocPDF2.pdf")
ShellExecute("MonDocPDF2.pdf")
Remarks

Properties specific to pdfPage variables

The following properties can be used to handle a page of a PDF document:
Property nameType usedEffect
HeightRealPage height in millimeters.
If this height is changed, the page is automatically resized and the elements are repositioned.
OrientationString constantAllows you to find out and modify the orientation of the page:
  • Orient0: Default orientation.
  • Orient90: Page oriented at 90°.
  • Orient180: Page oriented at 180°.
  • Orient270: Page oriented at 270°.
TextElementArray of pdfTextElementInformation about the text in the page.
WidthRealPage width in millimeters.
If this width is changed, the page is automatically resized and the elements are repositioned.
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/02/2023

Send a report | Local help