This is about a PHP PDF utility called "FPDF." Can anyone tell me if it is possible to change the margins on the second page of a PDF using the library. I set the margins on the first page, but because the first page has a letterhead, it starts about 2.5" down the page. When I come to the second page, I tried to reset the margins, but it does not appear to accept a reset. I am new at using FPDF, so I'm probably missing something. Here is my code:

$pdf = new PDF();
// First page
$html="Some Text";
//Second Page
$htmp="Some More Text";

The PDF is generated correctly with all text, images, etc., but the second page has a large white space at the top where the letterhead was. I've also tried reusing "SetMargins(25,25,25)" on the second page, also with no results.

Any help would be greatly appreciated.

5 Years
Discussion Span
Last Post by rayidi

try to add this $pdf->SetY(-25); after 12th line in your code. Lets try and let me know if it not working.

Edited by rayidi

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.