问题
I am using iText-7 java library to generate pdf using below code. (I am adding image to pdf doc)
pdf = new PdfDocument(writer);
Document document = new Document(pdf);
ImageData data = ImageDataFactory.create(imgfilepath);
Image img = new Image(data);
img.scaleToFit(imageWidth, imageHeight);
img.setFixedPosition(1, 0, 0);
document.add(img);
-Using same Image i have created PDF from acrobat.
Problem :
(1) When i print above 2 PDFs- 1 created using iText, 2- created using Acrobat - i see quality different in print.
- So i did research and come to know about there is something related iCC profile (color profile) which need to bind.
When i check metadata of both the PDFs i come to know there is some difference in Color Space property of PDF.( i have checked meta data here : https://www.metadata2go.com)
ITEXT PDF METADATA DETAIL:
Acrobat PDF METADATA DETAIL
So My Questions
(1) How can i get same quality like Acrobat using iText when print in CMYK Machine (ex.indigo)?
(2) Is There any Way to attach color profile(Color Space) to image in PDF? (currently what i have tried looks not working)
You can check both PDFs Here:
(1) PDF Created Using Acrobat
(2) PDF Created Using iText
Here some more information from iText RUPS:
iText Generated PDF Details
Acrobat Generated PDF :
来源:https://stackoverflow.com/questions/60738068/itext-embedding-color-space-icc-profile-in-pdf-images