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 - can't open pdf file,it's 374 MB File.
  FAQ FAQ  Forum Search   Register Register  Login Login

can't open pdf file,it's 374 MB File.

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


Joined: 07 May 18
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote hxg8202 Quote  Post ReplyReply Direct Link To This Post Topic: can't open pdf file,it's 374 MB File.
    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.

   
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (1) Thanks(1)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 18 at 8:06AM
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

Back to Top
hxg8202 View Drop Down
Beginner
Beginner


Joined: 07 May 18
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote hxg8202 Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 18 at 9:16AM
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');

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (1) Thanks(1)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 18 at 10:19AM
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

Back to Top
hxg8202 View Drop Down
Beginner
Beginner


Joined: 07 May 18
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote hxg8202 Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 18 at 11:04AM
thanks
i know. now i want to drawtext on this large file. what shall do?

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 10 May 18 at 12:23PM
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

Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 10 May 18 at 10:39PM
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.
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