Hi,
I found a nice little bug.
If you are using the document.save with a BufferedInputStream, it seems that the images are not completely written.
After changing to the document.save(String filename) everything was fine. I would say, that you are not calling BufferedInputStream.flush() before close. This can lead to unwritten bytes.
Code:
ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFormat.TIFF);
saveOptions.setTiffCompression(TiffCompression.CCITT_4);
saveOptions.setResolution(300);
try
{
Document document = new Document(content.getInputStream());
File tempFile = TemporaryFileManager.createTempFile("word-rendering", ".tiff");
// FXIME seems that this is not working? document.save(new BufferedOutputStream(new FileOutputStream(tempFile)), saveOptions);
document.save(tempFile.getAbsolutePath(), saveOptions);
return Renditions.create(filename, options.target(), tempFile);
}
catch (Exception e)
{
throw new RenderingException(e);
}