How do I convert to/from XOD and multipage TIFF, using only in-memory streaming, on Java?

59 views
Skip to first unread message

Aaron

unread,
Jun 18, 2015, 9:54:30 PM6/18/15
to pdfne...@googlegroups.com
Q:

I want to convert multipage TIFF files, obtained from a stream, into in-memory XODs that I can also stream out.  Similarly, I want to take in-memory XODs and stream them out as multipage TIFFs.  I can't use any image libraries with unusual licenses.  Is there sample code for doing so?

A:

The attached sample code shows how to do convert to and from in-memory XODs and in-memory multipage TIFFs.  You can simply use the files attached to this post to replace the PDFDrawTest.java and RunTest.bat included in the draw sample of the "Java, C/C++" builds of the PDFNet SDK (downloadable from https://www.pdftron.com/pdfnet/downloads.html).

The code requires the use of Sun/Oracle's JAI library, which is explicitly licensed to allow redistribution in commercial software.

Distribution information:

License allowing use by commercial enterprises:

Downloads:

As the RunTest.bat file shows, the only required library files are jai_codec.jar, jai_core.jar, and jai_imageio.jar.  Note that, as RunTest.bat shows, these jar files may need to be explicitly referenced in the classpath.

PDFDrawTest.java
RunTest.bat.txt
Reply all
Reply to author
Forward
0 new messages