Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read image file; unexpected problem for URI #212

Open
mapleLeat opened this issue Apr 21, 2018 · 5 comments
Open

Can't read image file; unexpected problem for URI #212

mapleLeat opened this issue Apr 21, 2018 · 5 comments

Comments

@mapleLeat
Copy link

mapleLeat commented Apr 21, 2018

<img id="bgimg" src="file:///33.jpg" style="width:100%;height:100%;margin-top:0px;margin-left:0px;display:block;" />
''img'' tag failed to read picture, print warning.
In my test project, most pictures can be used normally.
But there are individual pictures that cannot be used. I don’t know why.

For example using this image will fail and issue a warning:
http://res.cloudinary.com/daifiltp4/image/upload/v1524278777/33.jpg

@danfickle
Copy link
Owner

Java can't natively read CMYK JPEGs. See:
https://stackoverflow.com/questions/41280021/cmyk-image-display-on-pdf-using-pdfbox

@mapleLeat
Copy link
Author

mapleLeat commented Apr 25, 2018

@danfickle
Thank you for your comment!
Do you mean that I must first convert the picture to RGB format in order to use it normally?
The project I am developing is in the printing industry. It must be ensured that the PDF is generated in CMYK format.
Prior to this I used ITEXT to generate PDF, text and pictures are in CMYK format.
Is there any way to make it support the CMKY format?

@rototor
Copy link
Contributor

rototor commented May 10, 2018

@mapleLeat Sorry, but PDFBox (the replacement for iText OpenHtmlToPDF is using) does not support anything but sRGB at the moment. I plan to extend the org.apache.pdfbox.pdmodel.graphics.image.LosslessFactory of PDFBox to support extended colorspaces, bit-depths and CMYK. But I did not have the time yet to do so.

@THausherr
Copy link

PDFBox supports embedding of CMYK jpegs since June 2017.

@mapleLeat
Copy link
Author

@rototor thanks,trouble you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants