I would like to add an advanced print form into a customer web site. They have an online web form but they also want to have the form break apart into sections as PDF files so it's distributor print out only the sections they need. The full order form is about 15 pages, but sometimes distributors only use 2 to 4 pages to order.
My propose is to have a web-gadget with a list of all the pdf's with selection boxes, then the distributor check the box and press print and will automatically print just the selected documents.
1 Year Ago
Related Article:PHP Print PDF Report While Loop Problem
is a PHP discussion thread by fabzster that has 6 replies, was last updated 2 years ago and has been tagged with the keywords: pdf, php, print.
It seems that you are trying to go beyond what you can control from the server using PHP. Normally, when you use a PDF document you provide a link, the document opens in the browser and then you have the option of printing it.
PDFTK (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/) could solve most if not all of your difficulty. The only caveat being its a command line utility so you have to interact with it in that fashion. Which would also require server access to install it.
it sounds like your solution would be rather simple though, start with a single pdf file that represents each section of the order form. User selects which sections they need and that in turn is passed to pdftk which takes the files for only those sections, merges them down into a single temporary pdf and then pushes that pdf to the user's browser with a header, or even takes the user to a page that has an embedded pdf control and they can save the pdf or print it from there.
Sound like a great solution, but as you said is the command line utility that needs to be processed to install it in the server, which is not possible for me until the customer finish the process of installing it's own hosting server. Still is discussion, :(
But I found some classes and functions that might help in the meantime, at least to create and print PDF files from a web page.