iText embedding Color space (ICC Profile) in PDF Images

前提是你 提交于 2020-04-07 09:03:09

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!