gotcha

Author Topic: Why doesn't this SVG export as PDF?  (Read 2805 times)

April 18, 2018, 12:47:46 AM
Read 2805 times

gauche

  • Sr. Newbie

  • Offline
  • **

  • 3
Hi,

I was working on some branding (disclaimer: I am not a designer) and was exporting bits and pieces to PDF just fine. Then I added another design element and nothing would export correctly anymore - I just get a blank PDF. I tried copying bits and pieces out of the SVG into a separate one, and it still didn't export correctly. I tried uploading it to various online conversion websites - same result (guessing they're using Inkscape as a backend though).

Can anyone tell me why the attached SVG exports as a blank PDF?

board_branding.svg
*board_branding.svg
(17.82 kB . 500x707)
(viewed 1451 times)


Thanks
  • 0.92
  • Windows 10

April 19, 2018, 05:23:29 AM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
There's a problem with how the gradients (all objects are filled with a gradient) are defined.
Those gradients with a 'stop' tag inside can be displayed in Inkscape, but they cannot be edited, nor do they export to pdf.

To get rid of them, select each object and use the dropper tool with the object itself (you can also select multiple objects with the same color).
If you want to, you can then also remove the incompatible gradient definitions in the defs section of the SVG file, because they do not get removed automatically when running 'clean up document'.

Please also help Inkscape developers fix the issue by posting a bug report at https://bugs.launchpad.net/inkscape .

April 19, 2018, 10:05:10 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Moini, is that "stop id" related to the swatch?  I seem to recall that swatches are id'd as gradients (even though they aren't gradients), but I don't know how the stop id fits.

Yeah, that's what it looks like.  I just created a swatch in a new document, and it has the same stop id.

But wait, regular gradients have the same thing.  Does that mean that images with gradients can't be saved to PDF?  That would be a pretty serious bug, wouldn't it?

Well, I successfully saved an SVG file as PDF, with both a swatch-filled and gradient-filled object.  Let me test gauche's....  Hhmm, no luck there.

There must be more to it, than just the stop tag in the XML.  Can you explain more, Moini?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 20, 2018, 04:48:20 AM
Reply #3

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
It seems to be the transform matrix on the one-stop gradient (which is a swatch, indeed). If you remove that from each swatch in the document, it works.

Has this document been created with Inkscape from scratch?

April 21, 2018, 10:16:18 PM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
When I create a swatch from within Inkscape, it does not create the attribute "gradientTransform" (value "matrix"), as exists in the file attached.  Perhaps it's either the gradientTransform attribute, or the matrix value, (or both?) that's the source of the problem?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 24, 2018, 07:14:07 PM
Reply #5

gauche

  • Sr. Newbie

  • Offline
  • **

  • 3
Sorry for the delayed response, and thank you for providing the answer.

I can confirm that the file was entirely created within Inkscape. There are six distinct branding designs within my original SVG, and it was only this last one I provided that caused PDF conversions to stop working. I guess I did something that triggered the addition of the matrix transforms.

Anyway, by opening the SVG in notepad and manually removing all matrix transforms on all linear gradients, it works perfectly!

 :ty1: :ur:
  • 0.92
  • Windows 10

April 25, 2018, 06:45:29 AM
Reply #6

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Would you make a bug report for this, please, gauche? If Inkscape users can create files that don't export to pdf at all, that's not good... :-(

Please visit https://bugs.launchpad.net/inkscape to add one. And if you can remember how the objects in the file got their gradients (e.g. did you copy them in from another file? Did you use an auto-palette? Anything can help!) that would be very valuable info to add.

April 29, 2018, 12:24:55 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Also, if you can post a link here, to the new bug report, it will help us to be able to follow it.

If you don't want to get involved in this way, if you could provide whatever info you can remember about those particular objects, we can make the bug report.

I did note your comment that you made that file entirely in Inkscape.  And that makes it even more important for developers to know what's causing this problem.  So if you can remember anything about how you made those particular objects, it would be helpful.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

May 02, 2018, 12:16:03 AM
Reply #8

gauche

  • Sr. Newbie

  • Offline
  • **

  • 3
  • 0.92
  • Windows 10

May 02, 2018, 06:15:35 AM
Reply #9

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln