Dne 20.9.2014 13:59, Simon Cozens napsal(a): > I'm trying to use PdfPainter::DrawGlyph with a PdfStreamedDocument object > instead of a PdfMemDocument object. They're both PdfDocuments and if I cast > the pDocument manually it works; I wondered whether DrawGlyph could just be > rewritten to take a PdfDocument argument instead. > > But when I tried to do that, I found that there's a weird type signature > mismatch. The base class PdfDocument has > > PdfVecObjects * GetObjects () > > but PdfMemDocument has > > PdfVecObjects & GetObjects ()
Hi, it looks like a bug to me. There had been some API changes in the past, and this particular bit seems to be overlooked. 'svn blame' on both files may give a hint when and why the change was done. I'd prefer to have the two use the same prototype, most likely the one from PdfMemDocument, if possible (aka if all the descendants has the PdfVecObjects always available). > At this point I'm out of my depth. Is there a good reason why we can only draw > glyphs on in-memory documents, You might try it. Maybe the call of CreateFontDuplicate() manipulates objects in a way which prevent it to be used in streamed documents (once written data cannot be rewritten there). > and is there a good reason why the return value > of GetObjects is different in PdfMemDocument class? see above, looks like a bug/left-over from my point of view. Bye, zyx ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users