We have a requirement to generate a CMYK TIFF or JPEG image with 600 dots per inch. This final CMYK TIFF or JPEG should embed PDF or EPS files/logos inside it. We planned to generated PDF by embedding EPS or PDF files at first and convert the generated to TIFF with CMYK color scheme in 600 DPI. We also need ability to validate the PDF or EPS we are trying to embed into final CMYK TIFF is following CMYK color scheme or not. Please help with which library suits our needs. Thank y
Can you please specify which programming language you are using for this conversion task? Additionally, are you looking for code examples or just general guidance on the libraries available for this purpose?
We are looking for which libraries among Aspose PDF, Aspose Imaging and Aspose Page suits our needs well
Just updated subject line and we are using java
Your requirements involve processing different file formats. For example,
- You would need Aspose.PDF to convert PDF files into images or adding images into PDFs
- Aspose.Imaging can help you in modifying and converting different images e.g. TIFF and change the colorspace
- If you also plan to modify and process EPS files, you would need Aspose.Page
If possible, would you please share a sample scenario with sample source files along with sample expected output so that we can try to understand it more clearly? We will share more information with you.
Hi, Attached is the sample PDF generated using Aspose PDF temporary license, by placing a sample EPS file(I used PNG version of same in this case)
football_logo.png (21.7 KB)
Here is the link to associated EPS file https://people.sc.fsu.edu/~jburkardt/data/eps/football_logo.eps
image_1.pdf (459.7 KB)
and then converted it to TIFF with CMYK and 600 DPI using Aspose Imaging temporary license. I am not able to upload TIFF image probably due to its size.
Also as per following document Aspose PDF can convert EPS to PDF,
but when we tried converting we are seeing exceptions same as in this thread.
Also, once we generate PDF using Aspose PDF, we want to directly generate CMYK TIFF instead of saving it as an RGB TIFF using Aspose PDF first and then converting it to CMYK TIFF using Aspose Imaging as there might be color loss when we convert from PDF to RGB TIFF
Are you also using the API under macOS? What is your JDK version?
We are afraid that a direct conversion using Aspose.PDF is not currently supported. If possible, could you please share a respective CMYK TIFF for the above PDF that you have shared? We will log a feature request and investigate the feasibility accordingly to generate expected image from your PDF.
It looks like Tiff upload is not supported here in this forum. Is there any way I could send it out to you, rather than uploading image to somewhere and sharing it. Also when we generated RGB TIFF using Aspose PDF and then using Aspose Imaging when we converted RGB TIFF to CMYK TIFF we see color loss. I attached CMYK JPEG generated from CMYK TIFF using following JPEG options. JPEG lost most of color if you compare to PDF which is supposed to be our final output type(JPEG) with same colors and content in PDF
try (RasterImage image = (RasterImage) Image.load("/Users/****/Documents/Backup/images/image_no_compress_cmyk.tiff")) {
// Create an instance of JpegOptions and set the color type to RGB
JpegOptions jpegOptions = new JpegOptions();
jpegOptions.setColorType(JpegCompressionColorMode.Cmyk);
jpegOptions.setCompressionType(JpegCompressionMode.Progressive);
jpegOptions.setBitsPerChannel((byte) 8);
// Save the image as an RGB JPEG
image.save("src/main/resources/result/output_cmyk2.jpeg", jpegOptions);
}
image_1.pdf (218.5 KB)
output_cmyk1.jpeg (146.8 KB)
I tried JpegCompressionType.LossLess
as well, that gave me a blank image. Please help if I can use any other options
We have logged a feature request as PDFJAVA-44237 in our issue tracking system for PDF to CMYK TIFF direct conversion. We will definitely investigate the feasibility and inform you once this feature is available. About the expected output TIFF, we are afraid that our forum does not support large size attachments (>10MB). If possible, you can upload it to Google Drive or Dropbox and share the link with us.
Here are the google drive links for CMYK TIFF and RGB TIFF respectively https://drive.google.com/file/d/1Vl3-wuUjCEMbgImc6RE5apJFjh10Uuyz/view?usp=sharing
https://drive.google.com/file/d/18IaurUA8pUnAwRfXb3MjeiSh_esL5BzM/view?usp=drive_link
We also need EPS file support. EPS file will be in CMYK format. Half of our business team images are in EPS CMYK format. We need ability to embed these EPS files as component inside PDF and this PDF should keep the CMYK color space of content we embed.
LIke we discussed above, we want ability to convert PDF to CMYK TIFF directly to avoid color loss.
We also tried generating CMYK TIFF directly using Apache Imaging. It looks like when we write each graphic component it is end of the day converting to RGB from what I understood through this method.
CmykColor color = CmykColor.fromParams(Integer.parseInt(matcher.group(1)),
Integer.parseInt(matcher.group(2)),
Integer.parseInt(matcher.group(3)),
Integer.parseInt(matcher.group(4)));
return CmykColor.toColorIcc(color);
Right now we are trying to consider what is the best option for us?
Like you mentioned above
we might need
i) Aspose.PDF to convert PDF files into images or adding images into PDFs
ii) Aspose.Imaging can help you in modifying and converting different images e.g. TIFF and change the colorspace – Not sure about this part now?
iii) If you also plan to modify and process EPS files, you would need Aspose.Page
We have a meeting with our Business early next week to decide upon which libaries to use. Would appreciate any input before that. Thank you
We suppose that CMYK TIFF is what you expect from the API to generate? Right?
Sure, we will investigate the feasibility for this feature as well. Can we use same EPS file as reference that you shared above?
Our final output is actually CMYK JPEG and an RGB PNG but I noticed color loss in CMYK JPEG when we generated them from PDF
You mentioned above that you want to obtain CMYK TIFF from PDF using Aspose.PDF directly? Can you please confirm your actual requirements once again that you want to achieve using Aspose.PDF so that we can update the ticket information accordingly?
Please also confirm about the above.
Our final output is to generate CMYK TIFF and CMYK JPEG image and RGB PNG by embedding business uploaded CMYK PDF or CMYK EPS files/logos inside it and also text with CMYK color scheme with different styles and fonts and and colors at 600 dots per inch. Our main goal is to generate a lossless CMYK TIFF and CMYK JPEG by combining all the CMYK EPS/PDF and text components.
We planned to generate PDF by embedding EPS or PDF files at first and convert the generated PDF to TIFF and JPEG with CMYK color scheme in 600 DPI .
We also need ability to validate the PDF or EPS we are trying to embed into final CMYK TIFF whether it is following CMYK color scheme or not. At the same time we need ability to convert these EPS files to PDF without any color loss if we are only supposed to take
If you have any other ways to generate our final output CMYK TIFF and JPEG(600 DPI) directly by embedding CMYK EPS/PDF files text with various CMYK font colors and sizes, that would work too, as long as we are able to generate an image without any loss of colors for EPS/PDF files and texts.
Yes you can use following EPS file https://people.sc.fsu.edu/~jburkardt/data/eps/football_logo.eps
Thanks for sharing further details.
Along with updating the information of previously logged ticket, we have generated below tickets in our issue tracking system as well:
- PDFJAVA-44256 (Embed CMYK EPS files into PDF documents)
- PDFJAVA-44257 (Determine whether a PDF has CMYK color scheme or not)
- PAGEJAVA-291 (Determine whether an EPS has CMYK color scheme or not before converting to CMYK TIFF)
We will look into the details of these tickets and let you know once they are investigated and resolved. Please be patient and spare us some time.
Hi, Do you have any update on above tickets
The tickets have been logged recently in our issue management system and they will be investigated/resolved on a first come first serve basis. We are afraid that we do not have any updates at the moment as analysis is pending due to other issues in the queue. As soon as we make some progress in this regard, we will surely update you via this forum thread. Please be patient and spare us some time.
We are sorry for the inconvenience.
Hi @asad.ali ,
Our company just purchased aspose pdf and trying to fix this issue and also “PDFJAVA-44231”. As a developer, the license is not assigned to my account. How can I follow up this issue with our license?
Thank you
Shuo