-
Mar 11th, 2012, 01:07 AM
#1
Printing invoices and reports from website
Hi guys
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..
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Mar 19th, 2012, 06:12 AM
#2
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?
-
Mar 19th, 2012, 06:36 AM
#3
Re: Printing invoices and reports from website
Thanks
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.
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Mar 19th, 2012, 12:17 PM
#4
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.
Last edited by SambaNeko; Mar 19th, 2012 at 12:21 PM.
-
Mar 21st, 2012, 02:11 AM
#5
Re: Printing invoices and reports from website
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
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.
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Mar 20th, 2012, 12:38 AM
#6
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?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|