This content has been translated automatically.  Click here  to view the French version.
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures

For handle PDF files, the WLanguage has different types of variables:
pdfAttachmentThe pdfAttachment type is used to define all the advanced characteristics of an attachment in a PDF document.
pdfDocumentThe pdfDocument type allows to know all the characteristics of a PDF file: author, creation date, page content, ...
pdfPageThe pdfPage type is used to define all the advanced characteristics of a page from a PDF document loaded in memory.
pdfParameterThe pdfParameter type defines all the characteristics of the PDF file to be generated.
pdfSignatureThe pdfSignature type is used to define the advanced characteristics of the signature that will be applied to a PDF file when signing an existing PDF (via PDFSign).
pdfTextElementThe pdfTextElement type is used to find out all the characteristics of a text element in a PDF page.

The functions that allow you to handle PDF files via these variables are the following:
PDFAddImageAdds an image to a page in an existing PDF file.
PDFAddWatermarkAdds a watermark to all or some pages of an existing PDF file.
PDFCloseCloses the PDF file loaded in memory in a pdfDocument variable.
PDFGetSignatureGets the signature of a PDF document as a buffer.
PDFGetSignatureDateGets the date of one of the signatures of a PDF document.
PDFNbSignaturesGets the number of signatures in a PDF document.
PDFOpenOpens a PDF document and loads it in a pdfDocument variable.
PDFSaveSaves the content of a pdfDocument variable in a ".PDF" file.

Remark: The following functions allow you to handle directly the PDF files:
PDFExtractPageExtracts a page from a PDF file in an Variable of type Image.
PDFIsProtectedChecks whether the PDF file requires a password in order to be read.
PDFMergeMerges several existing PDF files into a single PDF file. The files are merged one after another. The paths of PDF files can be found in an array.
PDFMergeWithPasswordMerges several existing and password-protected PDF files into a single PDF file.
PDFNumberOfPagesReturns the total number of pages found in a PDF file.
PDFPasswordProtects a PDF document with a password.
PDFSignApplies an approval signature to an existing PDF.
PDFToTextExtracts the text found in a PDF file.
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
Minimum version required
  • Version 14
This page is also available for…
Click [Add] to post a comment