png and pdf

Post questions on how to use or achieve an effect in Inkscape.
JackFoster
Posts: 4
Joined: Mon Nov 03, 2014 11:05 pm

png and pdf

Postby JackFoster » Thu Nov 13, 2014 6:55 am

Hello,

Strange things happen when I try to save a png within a pdf. Here is my example : I first import the falcon.png image in inkscape then I save it as a pdf (dessin-1.pdf). Everything seems ok then I reopen it and save it a second time as a pdf (dessin-2.pdf). Now the image appears to be darker in a pdf viewer and if I rereopen it with inkscape no image appears !
Could anyone explain this to me ? Thank a lot for your help.
Attachments
dessin-2.pdf
(42.54 KiB) Downloaded 156 times
dessin-1.pdf
(46.61 KiB) Downloaded 168 times
falcon.png
falcon.png (48.66 KiB) Viewed 1663 times

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: png and pdf

Postby tylerdurden » Thu Nov 13, 2014 7:45 am

I suggest you use Inkscape to edit the document with SVG as working/construction format, and use PDF only for final distribution and printing.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: png and pdf

Postby Lazur » Thu Nov 13, 2014 7:50 am

Hi.

It's caused by that your embedded raster image has some transparency in the alpha values.

By the first saving as pdf it is represented then as an opaque raster image masked with a greyscale raster image,
then the second save as cannot handle the masking right.

Not sure if that's the format's limitation, but in practice inkscape cannot save as pdf with non-plain white masks as far as I know.
On a side note, pdf-s always have an opaque white background,
so if this is all about that airplane, a solution would be to merge the raster image on a white layer in a raster editor program and use that opaque image instead.

JackFoster
Posts: 4
Joined: Mon Nov 03, 2014 11:05 pm

Re: png and pdf

Postby JackFoster » Thu Nov 13, 2014 11:33 pm

Hello,

Thank for your answers. Since I use this image with a background, I need the transparency. So as tylerdurden suggested, I will use svg for my edits then save as a pdf.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: png and pdf

Postby Lazur » Fri Nov 14, 2014 12:27 am

Good luck with it!

A bit more notes for future reference.
In your image the reason for alpha values is not just the cropping, but the drop shadow -which, for the airplane's logic is unnecessary.
But even if it is needed for the look, it's not that necessary to have it merged straight in the raster image.
A more convenient solution from a pdf view would be to use a raster part with no transparency, clip it with a path, and maybe use the duplicant of that path for the drop shadow.


Return to “Help with using Inkscape”