Ways to generate pages optimized for printing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
jazzigor
Forum Newbie
Posts: 1
Joined: Mon Dec 28, 2009 5:53 am
Location: Spain

Ways to generate pages optimized for printing

Post by jazzigor »

Hi experts,

I'm searching for the best way to generate printable reports for some data. Example 1: a billing system that should generate a one-page printable invoice with a given design. Example 2: a medical report that spans several pages, each with a pre-defined design, too.

Right now I'm seeing two solutions:
a) use pre-built PDF form and generate a FDF file from the input data to fill in the blank fields.
b) use normal HTML and prepare a CSS with fixed sizes and positioning expressed in inches or centimeters instead of pixels and percentages.

What do you folks think about these to solutions? Do you have more ideas?

Regards,
Igor
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Ways to generate pages optimized for printing

Post by Christopher »

Either of those will work fine. PDF will give you more precise control and graphic options -- if you need them. HTML is simpler to implement and change.
(#10850)
Post Reply