[re-sending to ML since I forgot to reply-all] Dominik Seichter wrote: > Totally makes sense! Now I wonder way I overlooked this issue all the time :) > Thanks for pointing it out.
Some of the rest of the PoDoFo code assumes that documents can support operations that may not be possible with all kinds of documents. This makes it less than trivial to abstract the two document types. It doesn't help that PdfStreamedDocument seems to be a partial wrapper around PdfDocument that only exposes some methods. Intentionally? Or are they just things added to PdfDocument after PdfStreamedDocument was created, or stuff you didn't need and didn't get around to? Some of them are obvious (LoadDocument doesn't make sense with a PdfStreamedDocument for example) but many missing ones are not. It's not immediately clear what is and is safe or possible with a PdfStreamedDocument as compared to an ordinary PdfDocument. I'm also not really sure it makes sense to implement PdfStreamedDocument using PdfMemDocument; maybe they need to be more fundamentally refactored: - Rename PdfDocument to PdfMemDocument - Put methods and data members that are common between, and make sense for both of, PdfMemDocument and PdfStreamedDocument into `PdfDocument' - remove the dependency of PdfStreamedDocument on PdfMemDocument and make it inherit PdfDocument instead. Unfortunately, this is quite a bit more work and more importantly will require a bunch of analysis of the code for me to figure out how streamed documents are supposed to work, what's possible and what's not, etc. Also, right now it looks like few if any PdfElement based tools will work on them, meaning streamed documents cannot be used if the application writer wants to use any of PoDoFo's higher level features. Have I understood that correctly? If so, any ideas on how it might be possible to fix that problem? Some general information on what can and cannot be done with streamed documents vs memory documents would be extremely useful. Right now it's pretty confusing for me as I try to use PoDoFo to re-implement PDF export in Scribus - and I've been working on the library for a while. Streamed output support is there, but seems highly impractical to use for non-trivial cases. -- Craig Ringer ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
