简体   繁体   中英

On generating pdfs using itext pdf, CMYK image is producing pdfs of very large size

I am using Itext pdf to generate pdfs having images. For CMYK type JPEG images, i am getting pdfs of nearly double the size of the image used. But for the same image's RGB version, the pdf is nearly of the same size of the image.

I would like to know the exact reason behind the increase in size of the pdf. Please note that the pdf contains only the image and a few text comments.

I've taken a CMYK JPEG image from Wikipedia with a file size of 714 KByte.

I've created a PDF file with nothing but this image. This resulted in a file size of 1.06 MB, of which 714 KByte consist of the original image and 373 KByte for the color space info that is needed when you introduce a CMYK image. Together that's about 1.06 MB, which means that the overhead of the PDF objects is really small.

I guess you overlook the fact that the PDF expects ICC-based Color space info along with CMYK JPEG images. I didn't see any other abnormal results when testing with the image I found on Wikipedia.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM