Print Page | Close Window

PDF to text

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1532
Printed Date: 06 May 25 at 4:21PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: PDF to text
Posted By: battit64
Subject: PDF to text
Date Posted: 06 Aug 10 at 1:10PM
Hello

anyone has an exemple to convert pdf to text with coordoninate in VB .NET
thanks



Replies:
Posted By: Rowan
Date Posted: 12 Oct 10 at 1:44PM
Here's some VB sample code that demonstrates how to use the ExtractFilePageText function to extract text from all pages in a PDF with co-ordinates and other information.

' Load the test file and Iterate through each page in the 
' PDF and append it to a text file.

Dim strInputFilePath As String = GetInputFolder() + "apply_ fingerprint.pdf"

QP.LoadFromFile(strInputFilePath)

' Calculate the number of pages
Dim iNumPages As Integer = QP.PageCount()

Dim strText As String = ""
Dim nPage As Integer = 0

For nPage = 1 To iNumPages
strText = strText + QP.ExtractFilePageText(strInputFilePath, "", nPage, 4)
Next

' Write all the data to a file
s = oFSO.CreateTextFile(GetOutputFolder() + "extracted_text.txt", 1)
s.Writeline(strText)
s.Close()

' Display the text
MsgBox(strText)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk