https://s3.amazonaws.com/cdn.crane.com/pdfwork/breakingAdobe.pdf

On 17 Aug 2020, at 19:35, Pop, Rares <r...@crane.com<mailto:r...@crane.com>> 
wrote:

Hi guys,

I am trying to add the color space resources from a source document to another.


PDPage spotsPage = this.spotsDocument.getPage(0); // source document
PDPage docPage = newDocument.getPage(0); // target document

// copy color space
for (COSName name: spotsPage.getResources().getColorSpaceNames()) {
    PDColorSpace pdcs = spotsPage.getResources().getColorSpace(name);
    docPage.getResources().add(pdcs);

}
newDocument.save("out1.pdf");
newDocument.close();

However, when opening the out1.pdf with Acrobat, it crashes when looking at 
Print Output Preview to see the new colours.

What am I missing?

Thank you,
Ra

Reply via email to