PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Conversion from PDF to text
  • Special cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
PDFToText (Function)
In french: PDFVersTexte
Extracts the text found in a PDF file.
Example
MyString is string
MyString = PDFToText("C:\Temp\MyDocument.pdf")
// Display in a multiline edit control
EDT_EditMultiText = MyString
Syntax
<Result> = PDFToText(<Name of PDF file> [, <Range of Pages to Extract> [, <Password>]])
<Result>: Character string
Text of PDF file.
<Name of PDF file>: Character string (with quotes)
Name and path of PDF file to study.
<Range of Pages to Extract>: Optional character string (with quotes)
Pages whose text must be extracted. The format used is identical to the one used in the standard printout boxes: individual page numbers of range of pages separated by semi-colons. For example, "1;3;4;6-10;12" means that pages 1, 3, 4, 6 to 10, and 12 will be processed.
If this parameter is not specified or if it corresponds to an empty string (""), all the pages are extracted.
<Password>: Optional character string (with quotes)
Password required to open the file if the PDF file is password protected.
Remarks

Conversion from PDF to text

  • The formatting of the document is lost when the conversion is performed from PDF to text.
  • The text is extracted in the order or appearance of the PDF commands and it is sequentially written into the result string. The organization of the text in paragraphs and in blocks is kept (as well as the CR characters).
  • The Unicode characters are not returned.
  • The data found in a PDF form is not extracted (this data is not stored in the PDF file).

Special cases

  • PDFIsProtected is used to find out whether a password is required to open a PDF file.
  • PDFNumberOfPages returns the total number of pages found in a PDF file.
Component : wd250img.dll
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment