Chrome adds a gray outline to printed transparent png / gif

I am working on a print pattern in a browser to print to PDF, and I use transparent .png overlay in one section.

This happens with both transparent .png files and transparent .gif files :

Chrome, when printed (both in .pdf and in the preview window), it seems to display transparent images with a gray 1px line:

Figure A:

enter image description here

I tried this in several other browsers (including Safari), and none of them do what Chrome does. Has anyone seen this before? I need to find a way to disable it or hack on the Chrome side so that it works in different browsers.

, : http://jsfiddle.net/brandonscript/nELwd/ ( <img />) Cmd/Ctrl + P . , .pdf. , " ", .

. , , 100% .pdf 100% - , . . ( ) .pdf.

+4
3

, . , , , .

the original image,Wiped the empty white space around the image ...

, , . - .

EDIT ( @remus)

, , , , . . another image of mine, , . ( pdf ). , .

+1

, css ( pdf ), 2 : 1 1 ( yuour):

<img src='http://apigee.ignite.ms/iloveapis/portal/badge/heart-overlay.gif' width='300' height='400' class="screen"/>

<img src='http://apigee.ignite.ms/iloveapis/portal/badge/heart-overlay_print.gif' width='300' height='400' class="forPrinting"/>

css:

img.forPrinting { display:none }

css , css:

img.screen {display:none }
img.forPrinting { display:block; }
0

: PDF .

: enter image description here

:

, , HTML-. , , , .

. : jsfiddle.net/cyVqw/

: Print preview

PDF:

PDF Screenshot

To make sure that at any size the PDF will maintain the transparency of the image, I checked the PDF is saved in a higher resolution, for example, "Print Quality". this led to a large file, but with better scaling quality:

Here is a 33% high resolution preview:

High Resolution 33% preview

200% high resolution preview

High Resolution 200% preview

So, you need to adjust the PDF quality setting.

-1
source

All Articles