Hi Craig, On 28/02/12 00:39, Craig Ringer wrote: > On 27/02/2012 8:08 PM, Vincent Hennebert wrote: >> We would like to implement PDF Object Streams as defined in the PDF 1.5 >> Reference. In short, the structure tree would be stored inside a stream >> to allow for compression in the same way as the page content. > What's the status of object stream support in PDFBox? Is it possible the > feature is bettern implemented by adopting a PDFBox based backend? > > There's been long term planning talk of moving over to PDFBox as the > underlying PDF support library. It'd massively simplify work with PDF-in-PDF > embedding, reduce maintenance work, etc. Is it worth doing major enhancement > work on fop's pdf library if it may go away in future?
This is something that crossed my mind actually. Honestly I don’t have a definite answer to this. We would have to check whether PDFBox provides all the functionalities that the FOP PDF library has. Assuming this is the case, we would have to write a DocumentHandler/Painter implementation based on PDFBox, which is a major task. Then there is the problem of maintenance of such a renderer. How much work would that be to keep it in sync with the PDFBox library? There will inevitably be some overhead caused by the external dependency. On the other hand, the FOP PDF library has serious design flaws that make it impractical to use and enhance. Fixing those design flaws would require to heavily modify it, in which case we might as well restart with a more sound base. But this is something that we can do progressively, while keeping the renderer functional. We would have control over when and how we do the refactoring. So, while I can see the interest of having a PDFBox-based renderer, I’m not too sure about how to proceed. Other opinions are welcome. > I'm struggling with getting fop and pdfbox to play well together at the moment > as I work on enhancing fop-pdf-image to merge duplicate font subsets. The use > of two different pdf libraries makes fop-pdf-image much more complex and makes > working with fonts a lot harder. I'm sure it's not the only area where a > pdfbox-based backend might be good. > > -- > Craig Ringer Vincent
