Zunenonooo / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

PDF font contrast increased (font becomes blur) automatically when including GIF/PNG image on page #476

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
- create a dummy HTML file with some text and a GIF/PNG image
- duplicate the same HTML file and replace the GIF/PNG image with a JPG
- generate PDF files to see the font contrast difference
  (font becomes blur)

What is the expected output? What do you see instead?
- The font contrast shall be the same regard less of the image type
  (GIF/PNG with or without transparency, JPG, ...)

What version of dompdf are you using? What version of PHP? On what
operating system?
- DOMPDF dompdf_0-6-0_beta3
- FreeBSD 9 and PHP 5.3
- FreeBSD 6.4 and PHP 5.1.6

Please provide the HTML source code you want to convert, or any additional
information.
- See attached HTML file and image files

Original issue reported on code.google.com by mr.r...@gmail.com on 29 Apr 2012 at 2:30

Attachments:

GoogleCodeExporter commented 8 years ago
It looks like only Adobe Reader shows the PDF differently. Google Chrome and 
Foxit Reader don't blur text when GIF is embedded. So I don't think we can do 
something for this.
When printed, both documents will be exactly the same.

Original comment by fabien.menager on 30 Apr 2012 at 10:36

GoogleCodeExporter commented 8 years ago
Thanks Fabien for looking into this so quickly.

So this is like a compatibility issue with Adobe reader.

I tried rendering the page in IE and print to a PDF using PrimoPDF. The pages 
become consistent in the PDF file. I don't know any detail about PDF file 
format, but I guess there is something can be adjusted. Looks like the contrast 
of the font gets increased? I guess you guys will be busy for other priorities.

It would be really nice to have all pages of a PDF file creaded by dompdf 
rendered consistently in Adobe reader as it is one of the popular viewer for 
PDF file and we don't print every PDF file.

Original comment by mr.r...@gmail.com on 1 May 2012 at 12:07

GoogleCodeExporter commented 8 years ago
This isn't exactly a new problem, though we haven't really had a chance to 
investigate further (and no bug report was ever filed).
Ref: https://groups.google.com/d/msg/dompdf/FfY3HDN8b5E/BUJwZH6JGYEJ
Sample: 
http://eclecticgeek.com/dompdf/debug.php?identifier=331b3b340e64fc7c7a1b9ea0e79f
6ea1

Which version of Adobe Reader are you using? I was unable to reproduce in v9, 
so this may be a bug in earlier versions. I don't know that we'll have time to 
address the issue, and if it has been fixed in later version we may not need to.

Original comment by eclecticgeek on 13 May 2012 at 3:03

GoogleCodeExporter commented 8 years ago
I am using Adobe Reader 9.5.1.
The problem is there.

Original comment by mr.r...@gmail.com on 30 May 2012 at 4:52

GoogleCodeExporter commented 8 years ago
I am using Adobe Reader 9.5.1.
The problem is there.

Original comment by mr.r...@gmail.com on 30 May 2012 at 4:52

GoogleCodeExporter commented 8 years ago
Similar issue reported here:
http://stackoverflow.com/q/11652821/264628

In some further quick testing, I've found removing the image in Acrobat Pro 
appears to fix the text display. I'm guessing that the cause may be due to the 
way we're embedding the image. Perhaps it's triggering some kind of rendering 
mode that's affecting how the text is displayed.

Original comment by eclecticgeek on 25 Jul 2012 at 7:36

GoogleCodeExporter commented 8 years ago
32-bit PNG without transparency, JPG both seem ok. Could be an issue with 8-bit 
images or transparency.

Original comment by eclecticgeek on 26 Jul 2012 at 2:53

GoogleCodeExporter commented 8 years ago
Solved it by making a function which convers all PNGs to JPGs. I also needed to 
compress the images so it was on the way... Thanks eclecticgeek.

Original comment by rfoge...@gmail.com on 26 Jul 2012 at 7:29

GoogleCodeExporter commented 8 years ago
Is the fix mentioned earlier in Jul 26, 2012 available somewhere? I would like 
to give it a try. Thanks!

Original comment by mr.r...@gmail.com on 26 Mar 2013 at 12:47

GoogleCodeExporter commented 8 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00