Reputation: 624
I used inbuilt FPDF to generate a PDF.
I was facing a problem to display approx. 40 columns in a single row. The columns neither get displayed i next row nor they get wrapped, they got cut at the end of the page. I got this problem resolved by using:
// Array to set page size
$a = array(312,1200);
//Add first page
$pdf->AddPage('L',$a);
This makes resolution of my table very small as per my requirement, but i am facing problem while i am printing this page. As i can increase resolution in viewing PDF but not while printing it.
Upvotes: 0
Views: 560
Reputation: 3872
You can create User Defined Page Size if you declared units before:
$pdf = new FPDF('L', 'in', array(100, 50));// page 100"x50"
$pdf->addPage();
or
$pdf = new FPDF('L', 'in');// inches defined
$pdf->addPage('L', array(100, 50));// page 100"x50"
User Manual:
http://www.fpdf.org/en/doc/fpdf.htm
http://www.fpdf.org/en/doc/addpage.htm
Upvotes: 1