Adding OutputStream functionality to PDFImageWriter
---------------------------------------------------

                 Key: PDFBOX-1291
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1291
             Project: PDFBox
          Issue Type: Improvement
          Components: PDFReader, Utilities
    Affects Versions: 1.6.0
            Reporter: Patrick Lehmann


I've got the problem that i don't want to write the created image data to a 
file because I use it for server side converstion of a pdf. 
It would be convenient to have an overloaded version of writeImage. Instead of 
the outputPrefix parameter you could use an OutputStream as parameter. ImageIO 
can handle this correctly so i suggest to do something like the following:

public boolean writeImage(PDDocument document, String imageFormat, String 
password,
            int startPage, int endPage, OutputStream outStream, int imageType, 
int resolution)
{
     // stays the same
     output = ImageIO.createImageOutputStream( outStream );
     // stays the same
}

Without this change it is imposible to get the created image into RAM without 
reading it from the file again which is not the very best way to do so.

It would be great if there is a way to extend this feature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to