flyingsaucerproject / flyingsaucer

XML/XHTML and CSS 2.1 renderer in pure Java
Other
2.02k stars 564 forks source link

v9.10.x - restore ITextRenderer.getWriter() #425

Closed zyro23 closed 4 weeks ago

zyro23 commented 4 weeks ago

org.xhtmlrenderer.pdf.ITextRenderer#getWriter was removed here: https://github.com/flyingsaucerproject/flyingsaucer/commit/c42e40d65b374b2b81b182a8cb16b67d0c7f51f1#diff-246092821db38d32f7f7e1ffc7f742288468d66b90fe552933327a30659f23ffL602-L604

not sure if the removal was intentional or not as it looks somewhat unrelated to the rest of the commit.

we are using that method in order to access the writer instance from a PDFCreationListener, i.e.:

public class XmpMetadataPdfCreationListener extends DefaultPDFCreationListener {

    @Override
    public void preOpen(ITextRenderer iTextRenderer) {
        // ...
        iTextRenderer.getWriter().setXmpMetadata(...)
        // ...
    }
}

thanks & regards.

asolntsev commented 3 weeks ago

@zyro23 Restored the method, released 9.10.1: https://github.com/flyingsaucerproject/flyingsaucer/releases/tag/v9.10.1

zyro23 commented 3 weeks ago

confirmed. no more compilation errors. much appreciated. thank you!