I converted a Japanese pdf to TIFF with Aspose Java PDF 20.7 and it threw an Aspose exception internally. However, the same piece of code worked fine with 20.6
public static void convertAllPDFPagesToTIFFImages() throws IOException {
// Open document
Document pdfDocument = new Document("japanese_text.pdf");
// Create stream object to save the output image
java.io.OutputStream imageStream = new java.io.FileOutputStream("japanese_text.pdf.tiff");
// Create Resolution object
Resolution resolution = new Resolution(300);
// instantiate TiffSettings object
TiffSettings tiffSettings = new TiffSettings();
// set the compression of resultant TIFF image
tiffSettings.setCompression(CompressionType.CCITT4);
// set the color depth for resultant image
tiffSettings.setDepth(ColorDepth.Format8bpp);
// skip blank pages while rendering PDF to TIFF
tiffSettings.setSkipBlankPages(true);
// Create TiffDevice object with particular resolution
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);
// Convert a all pages of PDF file to TIFF format
tiffDevice.process(pdfDocument, imageStream);
// Close the stream
imageStream.close();
}
japan_text.pdf (197.5 KB)
exception_log.zip (2.2 KB)