Print Page | Close Window

Memory pb with extractFilepages

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1724
Printed Date: 26 Jun 24 at 7:56AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Memory pb with extractFilepages
Posted By: m56ober
Subject: Memory pb with extractFilepages
Date 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;



Replies:
Posted By: m56ober
Date 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!



Posted By: Dimitry
Date Posted: 01 Feb 11 at 7:36PM
Sounds great that you found the solution.
Also there is one more function http://www.quickpdflibrary.com/help/quickpdf/ExtractPages.php - ExtractPages() as an alternative to http://www.quickpdflibrary.com/help/quickpdf/ExtractFilePages.php - ExtractFilePages() .
 


-------------
Regards,
Dmitry



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk