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!
![]() |
QuickPDF0714 PDF |
Post Reply
|
| Author | |
kevinfeening
Beginner
Joined: 28 Jul 09 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: QuickPDF0714 PDFPosted: 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
|
|
![]() |
|
DELBEKE
Debenu Quick PDF Library Expert
Joined: 31 Oct 05 Location: France Status: Offline Points: 151 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
kevinfeening
Beginner
Joined: 28 Jul 09 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
DELBEKE
Debenu Quick PDF Library Expert
Joined: 31 Oct 05 Location: France Status: Offline Points: 151 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
kevinfeening
Beginner
Joined: 28 Jul 09 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
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 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 |
|
![]() |
|
kevinfeening
Beginner
Joined: 28 Jul 09 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
swb1
Debenu Quick PDF Library Expert
Joined: 05 Dec 05 Location: United States Status: Offline Points: 103 |
Post Options
Thanks(0)
Quote Reply
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 @
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store