Hi Jörg, You found a very interesting bug which I fixed in SVN now.
The problem was that PdfImmediateWriter writes all keys of a PDF object to disk, one you start adding data to the objects stream. Therefore all changess to keys in the PdfObject are lost and not written to disk after you did set the stream data. I changed PoDoFo so that it will report an error now if this happes and fixed the font emebedding code to not cause this error. Best regards, Dom Am Mittwoch, 18. November 2009 schrieb Richter, Jörg: > Hi, > > I found something I don't know if its allowed. Consider this snippet: > > PdfStreamedDocument document( "a.pdf" ); > PdfPainter painter; > PdfPage* page = document.CreatePage( PdfPage::CreateStandardPageSize( > ePdfPageSize_A4 ) ); painter.SetPage( page ); > PdfFont* font = document.CreateFont( "Arial" ); > painter.SetFont( font ); > painter.DrawText( 30, 30, "Hello" ); > painter.FinishPage(); > document.Close(); > > This creates a working PDF. But when I switch the SetPage and CreateFont > lines Acrobat Reader can't find the embedded font. Is this like its > supposed to be? > > Jörg > --------------------------------------------------------------------------- >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day trial. Simplify your report design, integration and deployment - and > focus on what you do best, core application coding. Discover what's new > with Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Podofo-users mailing list > Podofo-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/podofo-users -- ********************************************************************** Dominik Seichter - domseich...@web.de 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.
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users