Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.0   12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3    Statistic    FMM    Blog  

DynaPDF.ExtractPageText

Extracts the text of the page.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 3.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes

Deprecated

This function was deprecated. Use DynaPDF.ExtractText instead.

MBS( "DynaPDF.ExtractPageText"; PDF; pageIndex )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
pageIndex The number of the page. Must be within 1 and DynaPDF.GetPageCount. 1

Result

Returns the text or error message.

Description

Extracts the text of the page.
Use DynaPDF.ExtractDocumentText is you need text from whole document.

For Mac only solutions, you can also try PDFKit.GetPDFPageText instead.
Needs DynaPDF Lite license.

Examples

Queries page text of page 5:

$text = MBS( "DynaPDF.ExtractPageText"; $PDF; 5 )

Load PDF and extract text of page 2:

# initialize DynaPDF before running this:
Set Variable [$pdf; Value:MBS("DynaPDF.New")]
# load PDF from container
Set Variable [$r; Value:MBS("DynaPDF.OpenPDFFromContainer";$pdf; Test::data)]
# import all pages
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFFile";$pdf)]
# extra text of page 2
Set Field [Test::PageText; MBS("DynaPDF.ExtractPageText"; $pdf; 2)]
#Cleanup
Set Variable [$r; Value:MBS("DynaPDF.Release"; $pdf)]

See also

Release notes

Example Databases

Blog Entries

This function checks for a paid license.

Created 18th August 2014, last changed 10th November 2022


DynaPDF.ExtractPageRectText - DynaPDF.ExtractText

💬 Ask a question or report a problem


Start Chat