Name

swap_pages -- swap the order of two pages

Synopsis

bool swap_pages ( int page1, int page2 )

Description

This function is used to alter the order in which pages will appear in the resultant PDF file. This function in no way changes which objects are painted to the pages

Examples

Create three pages and then change the order of pages 2 and 3.

$page1 = $pdf->new_page("letter");
$page2 = $pdf->new_page("letter");
$page3 = $pdf->new_page("letter");
$pdf->swap_pages($page2, $page3);

See Also

History

The ability to reorder pages was added in version 1.13 but did not work properly. It was corrected in version 1.14.

Bugs

None known