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!
![]() |
Range Check Error |
Post Reply
|
| Author | |
Dmitry
Team Player
Joined: 21 Sep 06 Status: Offline Points: 47 |
Post Options
Thanks(0)
Quote Reply
Topic: Range Check ErrorPosted: 28 Oct 06 at 1:42AM |
|
Hi!
Please tell me about this error. It that cases it occurs? Qp.LoadFromFile('sample.pdf'); for i := 1 to Qp.PageCount do begin Qp.SelectPage(i); PageList_.Add(Qp.GetPageText(3)); end; At the page with number 14 occurs this error. Page with number 14 consists of many images, but also has a little of text.
|
|
![]() |
|
Dmitry
Team Player
Joined: 21 Sep 06 Status: Offline Points: 47 |
Post Options
Thanks(0)
Quote Reply
Posted: 30 Oct 06 at 8:58AM |
|
Really noone knows why occurs this error?
Here is this page: www.self-disciple.gorodok.net/sample.pdf Please try to extract text from this sample. Edited by Dmitry |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 30 Oct 06 at 10:32AM |
|
Hi!
I've got the same error while rendering to file ... I've seen the file is created with ActivePDF ... There're often Problems with ActivePDF ... I'm out of office now but i know i've a solution for you ;-) Be patient 'till tomorrow ... Best regards, Ingo Edited by Ingo |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 30 Oct 06 at 3:52PM |
|
Hi Dimitry!
If you're source-license owner i can help you immediately. If not you can wait 'till 5.15 will be released here or you should tell me which dcu-version you need ... ;-) With my code and the modificated version 5.15 i can extract the text from your sample... Best regards, Ingo // First i open the pdf making a copy to work with. // Sometimes i've problems with missing embedded fonts... // so i add one by myself... QP := TiSEDQuickPDF.Create; try QP.UnlockKey('MyKey'); QP.LoadFromFile(Edit1.Text); If QP.Encrypted > 0 Then QP.Unencrypt; QP.AddStandardFont(0); QP.SaveToFile(tpath + '_' + ExtractFileName(Edit1.Text)); Edit1.Text := tpath + '_' + ExtractFileName(Edit1.Text); finally QP.Free; end; // Now i load my work-pdf. // The direct-access-functions are not so // cpu-hungry ;-) QP := TiSEDQuickPDF.Create; try QP.UnlockKey('MyKey'); dafh := QP.DAOpenFile(Edit1.Text,''); x := QP.DAGetPageCount(dafh); STR := ''; verztxt := Edit1.Text + '.txt'; AssignFile(cf,verztxt); Rewrite(cf); pc := 0; for i := 1 to x Do begin dapr := QP.DAFindPage(dafh,i); QP.CombineLayers; STR := QP.DAExtractPageText(dafh,dapr,3); WriteLn(cf,Trim(STR)); // We know that QP want more and more cpu-capacity // if the pages are more and more ... // So i've made every 10 pages a break starting new ... pc := pc + 1; if ( pc = 10 ) Then begin pc := 0; QP.DACloseFile(dafh); QP.Free; QP := TiSEDQuickPDF.Create; QP.UnlockKey('MyKey'); dafh := QP.DAOpenFile(Edit1.Text,''); end; end; finally QP.DACloseFile(dafh); QP.Free; CloseFile(cf); end; //============================================== In file uPDFTrueTypeParser.pas i've made changes (which are included in the new 5.15 beta. With this changes i've got a good result extracting your sample.pdf: unit uPDFTrueTypeParser; // . . . function IsString(const str: string): boolean; var len: integer; p : PChar; begin len := length(str); result := CompareMem( p, pchar(str), len); inc(p, len); end; // . . . procedure TPDFTrueTypeParser.LoadFromString(const Source: String); var SS: TStringStream; begin If not IsString(Source) Then //Schmoekel, 2006-10 Exit; //Schmoekel, 2006-10 try // . . . |
|
![]() |
|
Dmitry
Team Player
Joined: 21 Sep 06 Status: Offline Points: 47 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 Oct 06 at 3:22AM |
|
Thanks, Ingo!
Please tell me when 5.15 version will released? |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 Oct 06 at 5:20AM |
|
Hi!
You can read here ... I can't look into the future ;-) The first beta is released. Best regards, Ingo |
|
![]() |
|
Dmitry
Team Player
Joined: 21 Sep 06 Status: Offline Points: 47 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 Oct 06 at 5:52AM |
|
Ok, I see.
|
|
![]() |
|
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