Image Viewer CP ActiveX Control

PDFExtractText

 

Extract text from PDF File for specific page range.

Public Function PDFExtractText( _
   ByVal strInputPDFFile As String, _
   ByVal strOutputTextFile As String, _
   ByVal iStartPage As Long, _
   ByVal iEndPage As Long, _
   ByVal bKeepLayout As Bool, _
   ByVal bKeepStreamOrder As Bool
) As Boolean

 

Parameter

strInputPDFFile
   the path of PDF file.

strOutputTextFile
   the path of output text file.

iStartPage
   the start page no. The first page is 1.

iEndPage
   the end page no. If set to -1, it will return total page.

Return Value

Return true - successful
Return false - Failed


Example

   

Visual Basic Syntax
bresult = ImageViewer1.PDFExtractText("c:\yourpdf.pdf", "c:\pdftext.txt", 1,-1, true,true)