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!
can't open pdf file,it's 374 MB File. |
Post Reply |
Author | |
hxg8202
Beginner Joined: 07 May 18 Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 07 May 18 at 7:54AM |
can't open pdf file,it's 374 MB File.
isuccess := FQP.LoadFromFile(PDFFile, ''); if isuccess = 0 then begin ShowMessage(IntToStr(FQP.LastErrorCode)); exit; end; LastErrorCode show 401. why? handle := FQP.DAOpenFile(PDFFile, ''); it can open,but functions DrawRotatedText、SetTransparency not works. What shall I do? thanks. |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(1)
|
Hi hxg8202 ;-)
you can use DAloadFromFile trying to avoid memory problems. There's a subset of these DA-functionalities you can use. Please keep in mind that it's not possible to mix DA- and non-DA-functions. BTW: You can read here a lot using the search functions with "memory"... Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
hxg8202
Beginner Joined: 07 May 18 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
thank you,
now i want load this 374M file,and use function DrawRotatedText to append Watermark, but It failed。like this function "DrawRotatedText" not in subset of these DA-functionalities Is it the reason for memory? isuccess := FQP.LoadFromFile(PDFFile, ''); if isuccess = 0 then begin ShowMessage(IntToStr(FQP.LastErrorCode)); exit; end; for i := 1 to FQP.PageCount do begin FQP.SelectPage(i); FQP.SetTextSize(FontSize); FQP.SetTextMode(1); FQP.SetTextColor(255, 0, 0); FQP.SetTransparency(Transparency); YSpac := Round(FQP.PageHeight) div 2; FQP.DrawRotatedText(10, 10, 45, sText); FQP.DrawRotatedText(10, 10 + YSpac, 45, sText); FQP.DrawRotatedText(10, 10 + YSpac * 2, 45, sText); FQP.DrawRotatedText(10, 10 + YSpac * 3, 45, sText); FQP.DrawRotatedText(10, 10 + YSpac * 4, 45, sText); FQP.DrawRotatedText(10, 10 - YSpac, 45, sText); FQP.DrawRotatedText(10, 10 - YSpac * 2, 45, sText); FQP.DrawRotatedText(10, 10 - YSpac * 3, 45, sText); FQP.DrawRotatedText(10, 10 - YSpac * 4, 45, sText); end; FQP.DASaveAsFile(handle, 'd:\newtest.pdf'); |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(1)
|
Hi,
DA-functions are using a different technics regarding file handling. A non-DA-function expects different file properties than DA-functions - so don't mix them. |
|
Cheers,
Ingo |
|
hxg8202
Beginner Joined: 07 May 18 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
thanks
i know. now i want to drawtext on this large file. what shall do?
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
like i've told you already:
Don't mix the functions! If you don't find a DrawText-function as a DA-version then there isn't any and you have to stop here :( There are many discussions here regarding this issue... What you can try is only load and save with another tool (perhaps this will change the structure for a better loading with normal QP-functions) but if this won't work you should stop here. |
|
Cheers,
Ingo |
|
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
Possible approaches:
1. Abandon DA functions if they do not include the features you need. 2. Experiment with smaller files to get a feeling for where the limit lies. 3. Use Process Explorer to find out more about what classes of memory you are short of. 4. Configure a larger swap file if you determine you are short of real memory. 5. Try using the 64-bit library and a 64-bit application, if your users can accept this. 6. If you have to use 32-bit and from the current limits you think it will help, configure your OS to permit a 3GB user space and set the PE flag to use this in your EXE. This needs testing, and also requires your users to configure for 3GB also. 7. If all this fails or is inapplicable to your situation, follow Ingo's suggestion and split up the PDF to allow you to process the sections separately, then merge them.
|
|
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