Description

When I try to render a page from one PDF into another, new PDF, I get the following exception: "Page is attached to one documen, but rendered in context of another."
The corresponding code in Page.php on line 427 tells me, that cloning has to be implemented instead of this exception. Is anyone actually working on this and if so is there a release date?
I need that function to build a new PDF from several pages of other PDFs.

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Posted by Ben Scholzen (dasprid) on 2008-09-29T06:36:29.000+0000

Are you serious about this? As far as I could see, this shouldn't be a huge change, and now this is hanging around since 0.6?

Posted by Ben Scholzen (dasprid) on 2008-09-29T07:30:01.000+0000

In my opinion it is not majo anymore, but a blocker. This is one thing among others which prevents me from using Zend_Pdf. Yet FPDF with FPDI are the only good open source option for creating more complex PDFs. If such simple things won't be fixed, you could kinda delete Zend_Pdf to make the Framework more lightweight without any loss. Just my two cents.

Posted by Jozef Hribik (jozef) on 2008-10-24T06:46:51.000+0000

Happy 2-nd birthday to this blocker. You should change the estimation from 4 days to 4 years.

@Ben Do you have a patch to submit?
@Alex Please evaluate. If this is an issue that we will not address before 1.8, please mark it 'postponed'. We should keep in mind that it has several votes, however, and prioritize it for post-1.8.

Posted by Tim Hawkins (thawkins) on 2009-04-29T14:59:15.000+0000

This issue is a major pain in the butt, it makes dynamic pdf file generation beyond the simple cases difficult.

Im generating reports, a report is a document with lots of variable length sections, I need to be able to have a second pdf doc open with templates for the various page types we use in the report, and be able to create new pages in my report document from the templates as we move through the report generation.

The lack of either of the two following functions makes this a pain.

1) Clone a page from another doc into the current doc as a new page.

or

2) Create a new page in the current document from an existing PDF file (like the "Zend_Pdf:;Load()" function).