Is anyone familiar with Zend Pdf framework and knows how to use it to merge two pdf-files.
Trying to open and merge 2 pdf-files. Gives me the following error.
--------------------------------------------------------------------------------------------
Uncaught exception 'Zend_Pdf_Excep tion' with message 'Page is attached to one documen, but rendered in context of another
--------------------------------------------------------------------------------------------
<?php
require_once 'Zend/Pdf.php';
$pdf1 = Zend_Pdf::load( "1.pdf");
$pdf2 = Zend_Pdf::load( "2.pdf");
foreach ($pdf2->pages as $page){
$pdf1->pages[] = $page;
}
$pdf1->save('3.pdf' );
?>
Might be some lack of understanding of how pages are "attached" to documents. I though it was just an array, containing page-instances.
Any help appreciated immensely!!
Trying to open and merge 2 pdf-files. Gives me the following error.
--------------------------------------------------------------------------------------------
Uncaught exception 'Zend_Pdf_Excep tion' with message 'Page is attached to one documen, but rendered in context of another
--------------------------------------------------------------------------------------------
<?php
require_once 'Zend/Pdf.php';
$pdf1 = Zend_Pdf::load( "1.pdf");
$pdf2 = Zend_Pdf::load( "2.pdf");
foreach ($pdf2->pages as $page){
$pdf1->pages[] = $page;
}
$pdf1->save('3.pdf' );
?>
Might be some lack of understanding of how pages are "attached" to documents. I though it was just an array, containing page-instances.
Any help appreciated immensely!!