Hi,

only the inheritable page object "MediaBox" are supported - see source code.
But the other ones "Resources", "CropBox" and "Rotate" are not supported.
If you append a pdf document where these page objects defined in the PageTree 
object (ref. PDF Spec "7.7.3.2 Page Tree Nodes") the result is a corrupt PDF 
document.

My solution that works for me:
Actually it copy all objects from the source document to the new target 
document. 
The pages will insert one by one the target page tree.
I have changed this that it inserts only the page tree from source document in 
the page tree of the target document as sub tree.

This code replace the "for ..." - loop:
####
PdfPagesTree* rPageTree = rDoc.GetPagesTree();
PdfObject*    pObj  = m_vecObjects.GetObject( PdfReference( 
rPageTree->GetObject()->Reference().ObjectNumber() + difference, 0 ) );
m_pPagesTree->InsertPage( this->GetPageCount()-1, pObj );
int     cnt = this->GetPageCount();
cnt += rDoc.GetPageCount() -1 ;
m_pPagesTree->GetObject()->GetDictionary().AddKey( "Count", PdfVariant( 
static_cast<pdf_int64>(cnt) ) );
#####


Regards Ronny.



------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware, 
phishing sites, and compromised hosts - saving your company time, 
money, and embarrassment.   Learn More! 
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to