Printing invoices and reports from website
Hi guys :wave:
In my PHP application, I have to allow the user to take the printout of invoices and reports.
Two options that I found are:
- display the report/invoice in a html page with no fancy stuff and properly ordered and thus user could print the page from the browser itself
- compose a PDF(dynamically) for the invoice/report and allow the user to download it and then print it.
Among them, which one is the better option ? Any pros and cons ?
Or any better solutions that you know ?
Thanks in advance.. :wave:
Re: Printing invoices and reports from website
I am doing the "first" option already - that works well.
I'm trying to get the "second" option working myself - using PDF-driver's on the server as "print devices" from my web services. Having many problems - still can't find the proper PDF-driver to use...
What have you done? Which choice did you go with?
Re: Printing invoices and reports from website
Thanks :wave:
But I haven't selected the best option yet. Trying to figure out whether there is any cross-browser solution in Sourceforge or somewhere else.
Re: Printing invoices and reports from website
Have tried both and prefer the first option myself as both a developer and a user. From the development side, it's more straightforward and easier to implement. It doesn't have to be boring, either - you can still create an aesthetically pleasing layout (be sure to specify a print stylesheet and test it). As a user, the information is more accessible than when it's in a PDF, it loads incomparably faster, and if I want a PDF, I'll make one myself.
But I've gone the PDF route for clients who want more meticulous control over the appearance of the output. For that I've used FPDF to create the file and served it as an attachment; this works fine cross-browser. Development takes longer as it can be hard to predict how the output will render, so I found myself editing and re-checking a lot.
Re: Printing invoices and reports from website
I would print from a PDF because if the document isn't displayed as it would be in portrait view in Word then could encounter problems when printing it. That is if you haven't already overcome those difficulties?
Re: Printing invoices and reports from website
Quote:
Originally Posted by
SambaNeko
Have tried both and prefer the first option myself as both a developer and a user. From the development side, it's more straightforward and easier to implement. It doesn't have to be boring, either - you can still create an aesthetically pleasing layout (be sure to specify a print stylesheet and test it). As a user, the information is more accessible than when it's in a PDF, it loads incomparably faster, and if I
want a PDF, I'll make one myself.
But I've gone the PDF route for clients who want more meticulous control over the appearance of the output. For that I've used
FPDF to create the file and served it as an attachment; this works fine cross-browser. Development takes longer as it can be hard to predict how the output will render, so I found myself editing and re-checking a lot.
Thanks :wave:
Then I think, I should follow the common practice of allowing the user to print from the browser itself.
@All: Do you guys have any suggestions or "do's and don'ts" for this. Or any useful guide or manual for this ? If there are rules or guidelines(already followed by all), it would be easy.
:wave: