Hi,
i am using: java, com.aspose.aspose-pdf:17.1.0.
This is the code i am using currently to add an image in a new pdf document:
final Document vorschauPdf = new Document();
vorschauPdf.setDisplayDocTitle(true);
vorschauPdf.getInfo().setTitle(BESCHREIBUNG_VORSCHAU);
vorschauPdf.getInfo().setCreationDate(new Date());
final Page page = vorschauPdf.getPages().add();
page.getPageInfo().getMargin().setBottom(20);
page.getPageInfo().getMargin().setTop(20);
page.getPageInfo().getMargin().setLeft(20);
page.getPageInfo().getMargin().setRight(20);
final TextStamp headerText = new TextStamp("test");
page.addStamp(headerText);
BufferedImage bufferedImage = ImageIO.read(documentRepository.getDocumentDataAsStream(document));
final Image image = new Image();
image.setBufferedImage(bufferedImage);
page.getPageInfo().setLandscape(true);
page.getParagraphs().add(image);
final ByteArrayOutputStream output = new ByteArrayOutputStream();
vorschauPdf.save(output);
The pdf which is genereated looks like this:
asposeBug.png (111.8 KB)
You can see in the link there is a orange color overlay above my picture which i tried to insert.
This bug happens not for all images, some images are rendered normally without that orange color overlay.
Can anybody help me? Has anybody seen this error before? Did i do something wrong in aspose?
Thanks