Print Page | Close Window

How to print a pdf page by page

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=428
Printed Date: 18 May 24 at 7:28PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to print a pdf page by page
Posted By: FKirch
Subject: How to print a pdf page by page
Date Posted: 06 Jun 06 at 9:50AM
Hi everybody,

I have a very big PDF file (size about 700 MB, 330 pages) which I want to print.
First of all I used Adobe Acrobat Reader for printing.
Unfortunately Adobe Acrobat Reader crashes, or hangs up while preparing to print this pdf-monster.

Thatīs why I decided to print the pdf page by page.

And thatīs why I tried to use quickpdf for printing.

Idea:

QP.LoadFromFile()
For i := 1 to QP.PageCount do
begin
QP.PrintDocument('printername',i,i,...)
end;

Result: QP.LoadFromFile() takes about 15 minutes to load the complete pdf-file. None of my users are willing to wait so long time.

QP.DAOpenFile() helped me to open the PDF-file.

But can anybody tell me, how to retrieve a single page and how to print this single page?

Fritz



Replies:
Posted By: Ingo
Date Posted: 06 Jun 06 at 10:50AM
Hi Fritz!

No chance i think...
Perhaps it's better using the standalone-function ExtractFilePages? You can create single-page-files, then printing, then deleting...

Best regards,
Ingo


Posted By: FKirch
Date Posted: 06 Jun 06 at 11:09AM
Hi Ingo

but QP.LoadFromFile() is a very very very time consuming process.
As I mentioned above it takes about 15 minutes and nobody can predict, whether this process comes to an end or the machine preferes to hang up.

Do you think somebody can code a DAExtractPages function?


Posted By: gkwardjr
Date Posted: 06 Jun 06 at 6:56PM

Hi Fritz

Did your company make the file or someone else?  I'm just asking because that is a pretty big file size for the number of pages.

I came across a similar problem recently.  However, it was a one time issue of a file someone else sent me.  I just printed sections of it to a pdf printer and then spliced them back together (The file was so large because the author did no or little compression of the content).  Afterwards the file was fine for everyone to print. 

If this is a one time deal you might try to recreate the pdf by using adobe distiller or primo or something.  You could also try to convert the pdf to an image with photoshop or similar program.  In both case you might want to split the document into smaller file sizes. 

Keith



Posted By: Ingo
Date Posted: 07 Jun 06 at 1:44AM
Hi Fritz!

What do you want again with QP.LoadFromFile()?
Take the STANDALONE-function ExtractFilePages.
There's no need for LoadFromFile in this case.
Only
QP := TiSEDQuickPDF.Create;
   try
       QP.UnlockKey('MyLicenseKey');
       QP.ExtractFilePages(BigFile, SmallFile, 'FromPage-ToPage');
//... and so on...

Best regards,
Ingo


Posted By: FKirch
Date Posted: 12 Jun 06 at 6:54AM
Hi Ingo,

Every call of QP.ExtractFilePages(BigFile,....) opens the BigFile to extract a range of pages.

If I use the following source to print single pages

QP := TiSEDQuickPDF.Create;
QPX := TiSEDQuickPDF.Create;
   try
       QP.UnlockKey('MyLicenseKey');
       QP.DAOpenFile(BigFile);
       For i := 1 to QP.GetPageCount do
       begin
        SmallFile := Format('%d.PDF',);
        QP.ExtractFilePages(BigFile, SmallFile, Format('%d',));
        QPX.LoadFromFile(SmallFile);
        QPX.PrintDocument('printername',1,1,...)
       end;

then in order to extract one single page
every call of ExtractFilePages always load the complete BigFile.
That is a solution which doesnt help. Sorry.


Posted By: Ingo
Date Posted: 12 Jun 06 at 7:20AM
...
But it's a standalone function and it should be better than using LoadFromFile?

If you want to print all pages you can use a pdf reader. If you want to use single pages from here and there it's okay i think. If you want to print from page 11 to page 21 it's onla yone call 'cause you can extract ranges.

Best regards,
Ingo



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