objects disappearing/hidden when saving svg as pdf

Post questions on how to use or achieve an effect in Inkscape.
BodatSawan
Posts: 4
Joined: Thu Mar 03, 2016 12:49 am

objects disappearing/hidden when saving svg as pdf

Postby BodatSawan » Thu Mar 03, 2016 1:03 am

Hi guys,

I am having issues saving my inkscape work as pdf. I am layouting an infographic with many small elements (some colored rectangles, little icons, text, etc.). Everything works well in inkscape svg but when I save as pdf, seemingly random objects and text are not visible when I open with acrobat or other pdf software.

At first hardly anything appeared, but after searching the web and playing around a bit (un-grouping, reapplying color, vacuum defs, re-raising selection, etc.), I managed to make most elements appear in the pdf (not quite sure how exactly). However, whatever I do, some elements just stay hidden and I can't find out why. Does anyone know why this could be the case? I read something about a bug with masks, but I have not used a mask in the document.

Appreciate any help!

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: objects disappearing/hidden when saving svg as pdf

Postby Moini » Thu Mar 03, 2016 2:09 am

Can you upload the file and make a screenshot of your pdf export options?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

BodatSawan
Posts: 4
Joined: Thu Mar 03, 2016 12:49 am

Re: objects disappearing/hidden when saving svg as pdf

Postby BodatSawan » Fri Mar 04, 2016 5:19 pm

Sorry, I got stuck with some other work all of yesterday. I have attached the svg (as zip) and a screenshot of the issue as well as the pdf options. I have tried playing around with the pdf options and using a pdf printer as well but couldn't make it work that way either. To me it seems like some elements are using settings that cannot properly be exported to other file formats? Many thanks!
Attachments
problem.png
problem.png (234.48 KiB) Viewed 5142 times
infographic_inkmod.zip
(177.22 KiB) Downloaded 173 times
screenshotpdf.png
screenshotpdf.png (105.87 KiB) Viewed 5142 times

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

Re: objects disappearing/hidden when saving svg as pdf

Postby tylerdurden » Sat Mar 05, 2016 1:20 am

Something is bad on the pie chart. :-/

I cut it to another document and removed the clips and pasted it back into the main document, cleaned the doc and things seem to be much better.
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/

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: objects disappearing/hidden when saving svg as pdf

Postby hulf2012 » Sat Mar 05, 2016 3:48 am

Hello
I've seen your file and several objects have a linear gradient instead a solid fill color. Maybe because of that, and the using of cliping, the objects aren't represented well when exporting to PDF.

Even in inkscape, changing those objects may take some time. There is the option of trying a virtual PDF printer, but I'm not sure if the same behaviour will repeat.

Tylerdurden:
Did you copy pasted all the page in a different inkscape document?... when copy-pasting does also the linear gradients where fixed?
I ask these, because in my machine lot of objects disapear when exporting to pdf, after checking if there are cliping paths. But I haven't modified their linear gradients.

mmm... perhaps I'm missing something
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

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

Re: objects disappearing/hidden when saving svg as pdf

Postby tylerdurden » Sat Mar 05, 2016 3:53 am

I usually dissect these problem files by deleting large groups and narrowing to suspect components.

I copied the chart and its "borders" to another document, then pasted them back in place.

Further investigation:

Interestingly, changing the fill of the "borders" on the pie chart resolves the issue.
2016-03-04_12-45-40.png
2016-03-04_12-45-40.png (103.88 KiB) Viewed 5106 times



OP:
Where did the graphic(s) originate? Or, what's the story with the swatches?
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/

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

Re: objects disappearing/hidden when saving svg as pdf

Postby tylerdurden » Sat Mar 05, 2016 3:54 am

PS

I usually delete un-needed clips as a rule.
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/

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

Re: objects disappearing/hidden when saving svg as pdf

Postby tylerdurden » Sat Mar 05, 2016 4:18 am

Further isolated to gradient "linearGradient12910-5", but I don't know enough about swatches and gradients to determine relationship to problem.
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/

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

Re: objects disappearing/hidden when saving svg as pdf

Postby tylerdurden » Sat Mar 05, 2016 8:10 am

Further isolated to transform matrix on gradient.

Code: Select all

<linearGradient
       id="linearGradient12910-5"
       osb:paint="solid"
       gradientTransform="matrix(0,0,0,0,2855.9886,603.54849)">
      <stop
         style="stop-color:#00294d;stop-opacity:1;"
         offset="0"
         id="stop12912-7" />
    </linearGradient>


Possibly related to bug:
https://bugs.launchpad.net/inkscape/+bug/569281

Substituting a matrix from a functioning gradient resolves issue.

Code: Select all

    <linearGradient
       id="linearGradient12910-5"
       osb:paint="solid"
       gradientTransform="matrix(0.94044871,0,0,0.94044871,-26.53893,-97.599118)">
      <stop
         style="stop-color:#00294d;stop-opacity:1;"
         offset="0"
         id="stop12912-7" />
    </linearGradient>


(All swatches seem to be single-stop linear gradients.)
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/

BodatSawan
Posts: 4
Joined: Thu Mar 03, 2016 12:49 am

Re: objects disappearing/hidden when saving svg as pdf

Postby BodatSawan » Mon Mar 07, 2016 5:47 pm

Hey guys, thanks so much for the help!

I changed the colours of the donut/pie to flat, including the borders and removed a stroke for one of its sections and that fixed it. So I conclude pdf can't handle the swatch colours and strokes. But I do not understand how all other elements got fixed by fixing this one. I guess that is some sort of bug?

Cheers!

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

Re: objects disappearing/hidden when saving svg as pdf

Postby tylerdurden » Tue Mar 08, 2016 12:03 am

BodatSawan wrote:... So I conclude pdf can't handle the swatch colours and strokes. But I do not understand how all other elements got fixed by fixing this one. I guess that is some sort of bug?


AFAICT, the problem is not with the swatches per-se, but maybe the combination of clip and swatch being relocated on the page.

I'll submit this for inspection on the buglist and see what others there think.

FWIW, The file has almost 600 unused swatches. A cleanup that includes the swatches helps there.

Why all the swatches? Did this svg originate in another program?
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/

BodatSawan
Posts: 4
Joined: Thu Mar 03, 2016 12:49 am

Re: objects disappearing/hidden when saving svg as pdf

Postby BodatSawan » Tue Mar 08, 2016 8:26 pm

Well, I am rather new to the software, could not quickly find a way to save my own color palette, and read somewhere that swatches are an easy way to quickly re-use RGB values used before. So I probably created a new swatch every time I chose a color - the file does not originate in another program. Also I did not (knowingly) use any clips. But they might have come from some of the svg's I imported into the document. Thanks again for the support.


Return to “Help with using Inkscape”