Hi
I’ve got a very simple TIFF image that I’m using to test the Aspose TIFF to PDF conversion. As you can see, the original image is green with white text and a purple border. In the resulting PDF the colours are very different.
I’m enclosing both the TIF and the resulting PDF.
I’m using aspose-pdf version 11.2.0.
The core part of the code is as follows:
import com.aspose.pdf.Document;
import com.aspose.pdf.Page;
import com.aspose.pdf.Image;
Document doc = new Document();
Page page = doc.getPages().add();
FileInputStream fs = new FileInputStream(fileLocation);
Image image = new Image();
image.setBufferedImage(ImageIO.read(fs));
page.getParagraphs().add(image);
ByteArrayOutputStream baOutputStream = new ByteArrayOutputStream();
doc.save(baOutputStream);
At a later stage I write out the file. The code works fine for other images types (e.g. jpg).
Thanks, Richard