make a report fit to a4 paper with php

I am new for php i can write a code to get data form mysql database , what should i learn to make agood report for print a4 paper or are there a tool to help to make it print in a 4 paper
teeraAsked:
Who is Participating?
 
steelseth12Connect With a Mentor Commented:
Do NOT use fixed values.
E.g <table width="100%"> will fit exactly on any paper size.
0
 
nizsmoConnect With a Mentor DeveloperCommented:
Are you wanting to make sure that the report prints and fits in an A4 page? The best practice and way to do this in my opinion is to trial and error, see how much you can fit, and use print-preview to see how close you are to the boundaries in terms of your contents on the page.

Hope this helps.
0
 
Loganathan NatarajanConnect With a Mentor LAMP DeveloperCommented:
according to me, you may use CSS + HTML, images styles, to design for exact fit for A4 size with using db data...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.