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 - Memory pb with extractFilepages
  FAQ FAQ  Forum Search   Register Register  Login Login

Memory pb with extractFilepages

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


Joined: 01 Feb 11
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote m56ober Quote  Post ReplyReply Direct Link To This Post Topic: Memory pb with extractFilepages
    Posted: 01 Feb 11 at 1:26PM
I have a big file 126000 pages
I must separate pages of this file
After 22% of traitement i have a memory problem.
Can you help me?

Thank you, Oliver

==================================================================
My procedure
==================================================================
Procedure tFRM_MAIN.WriteNewFile(pgfirst,pglast:integer);
Var
   FName  : String;
   outpdf : TQuickPDF0723;
Begin
   inc(nbfic);
   Plage := intToStr(pgfist)+'-'+intTostr(pglast);

   { FileName  : destination }
   fname := PREFIX +
            matricule + '_' +
            annee + '_' +
            FormatFloat('00000',nbFile)+
            '.pdf';

   { Extraction}
   outpdf := TQuickPDF0723.create;
   outpdf.UnlockKey(QPDFLicence);
   err := OutPdf.ExtractFilePages(Copie,    // source File
                                                    fName,   // Destination File
                                                    Plage);  
   FreeAndNil(outpdf);

   { Index }
   write(findex,mat+';'+name+';'+year+';'+FormatFloat('0000',nbFile)+';');
   if err = 0 then
   Begin
      writeln(findex,'Error');
      ShowMessage('Error '+intToStr(pdf.lastErrorCode));
   End Else writeln(findex,'');
End;
Back to Top
m56ober View Drop Down
Beginner
Beginner


Joined: 01 Feb 11
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote m56ober Quote  Post ReplyReply Direct Link To This Post Posted: 01 Feb 11 at 3:33PM
My problem is solved

it's not ExtractFilePages the problem but DAFindPage

For each group page, i'm using this code.
It's longer , but i have not memory problem

    FreeAndNil(PDF);
    PDF := TQuickPDF0723.Create;
    PDF.UnlockKey(QPDFLicence);
    FH := pdf.DAOpenFile(FileName,'');

Thank you!

Back to Top
Dimitry View Drop Down
Team Player
Team Player


Joined: 18 Feb 10
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dimitry Quote  Post ReplyReply Direct Link To This Post Posted: 01 Feb 11 at 7:36PM
Sounds great that you found the solution.
Also there is one more function ExtractPages() as an alternative to ExtractFilePages().
 
Regards,
Dmitry
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