-
Notifications
You must be signed in to change notification settings - Fork 359
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
Image is blurred in generated pdf #173
Comments
Hi @parag-bhole They certainly look blurry in the PDF. Could you upload a sample of the working image and non working image (I can’t download from localhost)? Thanks. |
Hi @danfickle |
I tested your two images with the
|
Ok thanks @danfickle for the pointing out where the issue is. Unfortunately image comes from webapp we don't own and all we have is URL to include in html, so may be we will have to live with it. |
FYI: I've created a patch and ticket for this upstream: https://issues.apache.org/jira/browse/PDFBOX-4184 In your case the alpha mask of the images is not correctly converted, the image looks broken because of that. When you want pixelated images (i.e. without interpolation) we must set
on the image, so that it does not get blured. To do so we should add support for the image-rendering CSS property (see https://developer.mozilla.org/de/docs/Web/CSS/image-rendering). This does not work with all PDF reader, but at least Acrobat and the PDFBox Debugger render interpolate=false images correctly. (Mac Preview does not...) |
Hi, I am trying to create a pdf from html source, which has certain images loaded from URLs. Few png images of size 16x16 pixels are getting rendered blurred, while other images on page are looks fine. Please see the attached pdf and html files. In pdf images in "Priority" column in tables are not rendered properly. How can I fix this?
generated.pdf
from_html.html.txt
The text was updated successfully, but these errors were encountered: