Hi Pdfbox dev ML!

I'm working with org.apache.pdfbox.multipdf.Overlay class to... well...
add overlays to PDFs and the functionality is great but I have a minor
issue with the API - it's completely filename-based and even though
PDDocument.load, that is used internally, has a lot of useful overloads
I don't see a workaround to load InputStream or a byte array as an overlay.

I see one place that all strings (that Overlay accepts) are converted to
PDDocuments, the loadPDF method:

    private PDDocument loadPDF(String pdfName) throws IOException
    {
        return PDDocument.load(new File(pdfName));
    }

If that method was at least "protected" I could override it in my own
subclass and return my own PDDocuments, loaded from InputStream or byte
arrays.

Do you think it would be a good idea?

If not, what would be the a better one? (Except copying the class and
modifying it myself, that I'm also considering :) ).

Thank you for your time!

Kind regards,
Wiktor

-- 
https://metacode.biz/@wiktor

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to