Hi,

The relevant code, where PdfFontCID ist called with a NULL PdfEncoding is only 
called, when you try to construct a PdfFont from an existing object in a PDF 
file. Support for this is not very good. It works with simple fonts, but PoDoFo 
is currently not able to consturct the encoding for a CID font from a PDF file. 
So, PoDoFo should not crash in this case, but maybe throw an exception that 
this is not supported.

What do you want to do excactly? Maybe we can find another solution.

Best regards,
        Dominik

Am Sonntag 02 Mai 2010 schrieb xteo:
> Hi ,
> 
> I have recently started looking at podofo for one of my project that need
>  PDF support .
> 
> It look like a really great library !!
> 
> to get started and make sure all was working ,
> I builded the library in my project and replicate the code from the code
>  that extract the text from a PDF .
> 
> version downloaded from the website : 0.8.0 compiled on Mac .
> 
> on some PDF its working fine and I get what I expect but on some other it
>  crash .
> 
> I have looked into it and fond the cause but I am missing a little bit of
>  context to try to fix it :
> 
> int : PdfFontFactory.cpp
> 
> PdfFont* PdfFontFactory::CreateFont( FT_Library* pLibrary, PdfObject*
>  pObject ) {
> ......
> 
>        pFont       = new PdfFontCID( pMetrics, NULL, pObject, false );
> 
> }
> 
> This create a PdfFontCID with a NULL pPdfEncoding.
> 
> This later leads to issue in the constructor when void PdfFontCID::Init(
>  bool bEmbed ) is called and m_pEncoding is NULL .
> 
>       // The encoding is here usually a (Predefined) CMap from
>  PdfIdentityEncoding: m_pEncoding->AddToDictionary(
>  m_pObject->GetDictionary() );
>       ^^^^^^^^^^^ is NULL
> 
> I am not sure what to make of the comment , I have try to pass various
>  encoding to PdfFontCID , but didn't managed to fix the problem .
> 
> Please let me know if there is anything ovious that I am missing .
> 
> Damien
> 


-- 
**********************************************************************
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