Page 1 of 1

Showing two of 10 pages in a PDF

Posted: Fri Aug 18, 2006 8:42 pm
by RobertGonzalez
I have a client that wants to offer the ability to allow customers to view two pages out of a 10 page PDF file. This is similar in nature to this PDF registration document.

Does anyone know how to do this without chopping up the PDF file? There is a strong chance that this capability may be rolled out to a file that has a posible 10,000 pages that needs to be made readable by account number only where the member sees their account info page only. Any help would be appreciated.

Posted: Fri Aug 18, 2006 9:07 pm
by Ambush Commander

Posted: Fri Aug 18, 2006 10:44 pm
by feyd
I think PHP may scream at a 10,000 page document. I would consider doing it manually if you run into anywhere near memory issues. Although it's painful to say it, storing the two pages in a blob may give just the right amount of security needed. .. Could also look into adding watermarking/branding and password protection to it, dynamically. I remember something about fpdf being able to open and manipulate existing documents.

Posted: Fri Aug 18, 2006 11:32 pm
by nickvd
feyd wrote:I remember something about fpdf being able to open and manipulate existing documents.
Indeed it can, I wrote a very quick and dirty coupon generator based on fpdf, it would load the coupon template, add the appropriate text and email it/display it. But you should be able to use fpdf to just strip out the pages you want and create a new pdf containing just those pages.

10,000 pages? not too sure if the server would survive...

Posted: Fri Aug 18, 2006 11:34 pm
by RobertGonzalez
Yeah. I am not sure how to tackle this one. I may have to get more information about this project before I go any further.