Commit 20446770a141a227be2bdf1d126d288aaad2d634
1 parent
3c4200bfa9
Exists in
master
fpdf_demo: added comments clarifying page size
Showing 1 changed file with 8 additions and 6 deletions Side-by-side Diff
fpdf_demo
View file @
2044677
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <?php |
4 | 4 | /** |
5 | 5 | * FILENAME: |
6 | - * fpdfdemo | |
6 | + * fpdf_demo | |
7 | 7 | * |
8 | 8 | * DESCRIPTION: |
9 | 9 | * Demonstration of the FPDF PHP Library for generating PDF files |
10 | 10 | |
... | ... | @@ -50,13 +50,15 @@ |
50 | 50 | // load up the Site Summary Figure to go on page #2 |
51 | 51 | $ssfPageCount = $pdf->setSourceFile(__DIR__ . '/site_summary_figure.pdf'); |
52 | 52 | |
53 | -print "Page count of site summary figure form is $ssfPageCount\n"; | |
53 | +//print "Page count of site summary figure form is $ssfPageCount\n"; | |
54 | 54 | |
55 | 55 | // import the SSF page |
56 | -$ssfTemplate= $pdf->importPage(1); | |
57 | -print "Page size of site summary figure PDF is: "; | |
58 | -$ssfSize = $pdf->getTemplateSize($ssfTemplate); | |
59 | -print "{$ssfSize['w']} x {$ssfSize['h']}\n"; | |
56 | +//$ssfTemplate= $pdf->importPage(1); | |
57 | +// NOTE the page sizes are in millimeters, as that's what we specified when | |
58 | +// the PDF document was first created (above) | |
59 | +//print "Page size of site summary figure PDF is: "; | |
60 | +//$ssfSize = $pdf->getTemplateSize($ssfTemplate); | |
61 | +//print "{$ssfSize['w']}mm x {$ssfSize['h']}mm\n"; | |
60 | 62 | |
61 | 63 | // add the SSF file to the 2nd page |
62 | 64 | $pdf->AddPage(); |