Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - QuickPDF0714 PDF
  FAQ FAQ  Forum Search   Register Register  Login Login

QuickPDF0714 PDF

 Post Reply Post Reply
Author
Message
kevinfeening View Drop Down
Beginner
Beginner


Joined: 28 Jul 09
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote kevinfeening Quote  Post ReplyReply Direct Link To This Post Topic: QuickPDF0714 PDF
    Posted: 28 Jul 09 at 11:07PM
I am using Delphi 5 and interbase 7.5
 
I require to export to delphi / Interbase a PDF File containing employee data
when i use this code in Delphi
 
     memo1.Clear;
     qPDF := tQuickPDF0714.Create;
     qPDF.UnlockKey(Quickpdfkey);
     try
     if OpenDialog1.Execute then
          begin
          FileRef := qPDF.DAOpenFile(OpenDialog1.FileName,Quickpdfkey);
          PageRef := qPDF.DAFindPage(FileRef,1);
          Memo1.Lines.Text := qPDF.DAExtractPageText(FileRef,PageRef,0);          
     end;
     finally
          qPDF.Free;
     end;
 
The data displays but not in the same order as the PDF file (It waps around in no order). Is there a export program or a PDF Converter to achieve this on Delphi
Back to Top
DELBEKE View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 31 Oct 05
Location: France
Status: Offline
Points: 151
Post Options Post Options   Thanks (0) Thanks(0)   Quote DELBEKE Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jul 09 at 6:44AM
You can use qPDF.DAExtractPageText(FileRef,PageRef,3).
With this option set, you'll obtain the textes and positions for each piece of text.
Back to Top
kevinfeening View Drop Down
Beginner
Beginner


Joined: 28 Jul 09
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote kevinfeening Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jul 09 at 7:01AM

3 shows the strings for fonts etc and the text displayed out of order as well

is it possible to display the text only on the same format as the pdf file

the dispay using qPDF.DAExtractPageText(FileRef,PageRef,3)

is still out of order to the actual pdf file the lines are completely mixed up
Back to Top
DELBEKE View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 31 Oct 05
Location: France
Status: Offline
Points: 151
Post Options Post Options   Thanks (0) Thanks(0)   Quote DELBEKE Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jul 09 at 6:29PM
The order of texts is defined at the creation of the PDF and can't be changed.
The fisrt writen on the pdf is the first in the output.
Back to Top
kevinfeening View Drop Down
Beginner
Beginner


Joined: 28 Jul 09
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote kevinfeening Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jul 09 at 11:19PM
Master Listing

28/07/2009 02:31:02 PM Printed  Page 1

Current Employees In Surname Order 

Name No Address Phone

Work Mobile
POWER CLUB SOCIAL CLUB 1132321331

ABN

   130 Peter ANDREWS 123 The Main Road COOLUM BEACH QLD 4573  2312123111

040111223322

    29 Mathew COOPER 95 My Way Lane TEWANTIN QLD 4565  0411132236

Back to Top
kevinfeening View Drop Down
Beginner
Beginner


Joined: 28 Jul 09
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote kevinfeening Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jul 09 at 11:23PM
The previous list is the export from the PDF the first line is OK
the second is OK
the actual 3rd line is showing in the 6th line
ABN on the 7th line should be between SOCIAL CLUB and 1132321331
 
I am trying to get the data from the file for a client who exports data using pdf and wants me to import some of the data into another database is there an export option I can use fro pdf to allow this 
Back to Top
swb1 View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 05 Dec 05
Location: United States
Status: Offline
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote swb1 Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 09 at 1:14AM

No. There is no such text extraction routine. The order of the text in the PDF is not necessarily the same as it appears. If fact my experience has been that it is very rare to find the text in a left-to-right, top-to-bottom order in a PDF document.

You will need to use option 3 and then parse and sort the output so you can put the text in the correct order and on the correct line. There are many ways to accomplish this but none of them are simple. This will require some work on your part.
 
I have posted some sample code @
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store