Hi, Where did you find the information in the PDF reference that references are allowed in the filters array? From my understanding of Table 3.4 in the PDFReference 1.7 is states clearly that the /Filter key is either of type name or array.
I added a patch to SVN. Could you please check if this fixes your problem?
Best regards,
Dom
Am Mittwoch 12 Mai 2010 schrieb A. Massad:
> Hi,
>
> Found a problem with podofo (svn r1231 and older versions) which I cannot fix
by myself: It's located in PdfFilter.cpp (line 366) where it is required that
the array elements of /Filter have to be names:
> > if (! (*it).IsName() )
> > {
> > PODOFO_RAISE_ERROR_INFO( ePdfError_InvalidDataType, "Filter array
> > contained unexpected non-name type" ); ...
>
> However, according to the PDF spec it is not forbidden to have references in
the filter array. For example, the following PDF code with the reference "487 0
R" is valid by the spec (and by Acrobat preflight for syntax errors):
> > 485 0 obj
> > <<
> > /Range [0 1 0 1 0 1 0 1]
> > /Filter [487 0 R]
> > /Domain [0 1 0 1 0 1 0 1]
> > /FunctionType 4
> > /Length 28
> >
> > stream
> > x<9c>«V0PP0U0T(ÊÏÉ!<8a>]<90>_<80><82>k^A<s^R<91>
> > endstream
> > endobj
> >
> > 487 0 obj
> > /FlateDecode
> > endobj
>
> Still, this PDF code is rejected by podofo! To fix it, the file
PdfFilter.cpp:366 has to be extended by some kind of dereferencing in case of
(*it).IsReference(). This is usually done by code fragments like this:
> > const PdfObject* pElem = *it;
> > while ( pElem && pElem->IsReference() )
> > {
> > pElem = pParent->GetObject( pElem->GetReference() );
> > }
>
> However, how do get the parent object pParent into the PdfFilter class. It
> is required to apply GetObject() to it, isn't it? Could you please help
> me, to fix this?
>
> Thank you,
> Amin
> ---------------------------------------------------------------------------
> ---
>
> _______________________________________________
> 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
**********************************************************************
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
