Hi Jean,

Thanks for your patch! I commited it a minute ago!

Best regards,
        Dom

Am Donnerstag 29 April 2010 schrieb Jean Ghali:
> Hi,
> 
> I recently came across some pdf files which define pages boxes using
>  reference to array objects. In this case PdfPage::GetPageBox() returns a
>  zero width/height rect.
> 
> Here is a patch which fix this issue :
> 
> 
> Index: PdfPage.cpp
> ===================================================================
> --- PdfPage.cpp       (revision 1222)
> +++ PdfPage.cpp       (working copy)
> @@ -201,6 +201,12 @@
> 
>      // Take advantage of inherited values - walking up the tree if
>  necessary pObj = GetInheritedKeyFromObject( inBox, m_pObject );
> +
> +    // Sometime page boxes are defined using reference objects
> +    while ( pObj && pObj->IsReference() )
> +    {
> +        pObj = m_pObject->GetOwner()->GetObject( pObj->GetReference() );
> +    }
> 
>      // assign the value of the box from the array
>      if ( pObj && pObj->IsArray() )
> 
> Regards,
> 
> Jean Ghali
> 
> 
> 
> ---------------------------------------------------------------------------
> --- _______________________________________________
> Podofo-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/podofo-users
> 


-- 
**********************************************************************
Dominik Seichter - [email protected]
KRename  - http://www.krename.net  - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to