For a project I need to create some .pdf´s from some files I have made, but the problem is that when I export them to pdf almost none of the objects are there.
Some screenshots of what I mean:
The inkscape file before exporting and what I want the result to look like: https://imgur.com/R4sXr9d
As you can see it are simple shapes and nothing to fancy with gradients or the likes.
This problem is existing in all the files that I've tried. I looked into preparing the file for export as much as I could like converting the text to paths, but nothing seems to help.
I also tried searching for discrepancies between the objects that did export and those that didn't but I could not really find anything, I compared the objects in the XML editor but there was nothing that caught my eye.
I've tried all the options in the pdf export settings, but nothing seems to change anything.
Searching online for a solution did not provide a result.
The problem is not only existing when I export to .pdf but also when I export to .eps, but when I export the drawing as .png everything is fine.
Anybody know some steps I might have missed in preparing the file for export, other things I missed or what the cause of this problem is?
So, we can see there is a fair bit missing from the code for the gradient, like half.
If we insert the missing code into the document with a text editor, the objects carry over into the pdf.
I'm guessing the file was not originally from Inkscape, or it got saved as a pdf then got brought back into Inkscape. For whatever reason, the code is missing and trips-up the conversion process to pdf.
The file was originally created in Inkscape, but later had a .dxf imported in it so that has maybe caused it.
@Aero, thanks this is the solution to my problem, after deleting those lines from all the files they've exported without a problem! So thanks to both of you for your help.
I tried deleting the "<linearGradient..." section in XML as I don´t use any gradients in my design. As a result, some objects lost their fill but I could change that manually. The pdf then exported ok, I´m just not sure if my action had no unwanted consequences that I haven´t noticed...
Tried a better method now, changed the colour in "<linearGradient..." section in XML to #ff00ff, that helped me to indetify most objects in question and remove the unwanted gradient from them. Still there are few more remaining. Is there an easy way how to relate an object highlighted in the Inkscape XML Editor view to the "real" object in the working space? Doing it visually would of course be ideal.
Typically, the objects selected in the xml are indicated in the workspace by the bounding box.
That´s what I´d have expected but it does not happen in this case.
Tried searching for "linearGradient" (Value ID search enabled), found one object and amended it. Still there are some 9 "svg:linearGradient id" in the XML related to objects I can´t find.
I see, thanks! It helped with some, but not all of them. Out of those remaining, most had no further occurence in the XML. 6 had occurences, I found 3 using the Search function but the rest can´t be found :(
You can click on my avatar to see my profile where there is an envelope button to send a DM. I'll reply back with my email addy, but check that you have email notifications enabled (those may land in your spam).
I hope you can see it on the attached files, that I am making a business-card on Inkscape, Underneath the part that says "Hemerit's Ankh" (in golden writing) there is written "Event & Food" (in silver). However, when I try to save a pdf copy, only halve of the silver writing is shown.
I know that this post is quiet old but i have obtaine a similar issue during my use of Inkscape 0.92.
I had a lot of object (simple shape or text) that was missing after exporting in pdf format and even with a direct printing from Inkscape.
I have solved this issue by changing from "?" (unknown background) in the setup "font" from "background and outline" to "flat". And then i was able to export correctly the object that wasn't appeared precendtly. For the text, it's the same solution but in the setup "outline"
Hope that will help someone and that i had explain correctly my process.
Hello,
For a project I need to create some .pdf´s from some files I have made, but the problem is that when I export them to pdf almost none of the objects are there.
Some screenshots of what I mean:
The inkscape file before exporting and what I want the result to look like: https://imgur.com/R4sXr9d
And what the pdf ends up looking like: https://imgur.com/DSbonOP
As you can see it are simple shapes and nothing to fancy with gradients or the likes.
This problem is existing in all the files that I've tried. I looked into preparing the file for export as much as I could like converting the text to paths, but nothing seems to help.
I also tried searching for discrepancies between the objects that did export and those that didn't but I could not really find anything, I compared the objects in the XML editor but there was nothing that caught my eye.
I've tried all the options in the pdf export settings, but nothing seems to change anything.
Searching online for a solution did not provide a result.
The problem is not only existing when I export to .pdf but also when I export to .eps, but when I export the drawing as .png everything is fine.
Anybody know some steps I might have missed in preparing the file for export, other things I missed or what the cause of this problem is?
Here is an example .svg file if you want to take a look: https://1drv.ms/u/s!AnQjZIfKY6zjhsZkIrNMX___Lg395A?e=dliaeC
My OS is Windows 10 Home, version 10.0.18363 and I used Inkscape-1.0-x64
This may be a bug.
Can you share a test file with a single object having a swatch color for the fill?
Thanks.
It CAN work, btw.
First of all thanks for the taking a look at it.
I've made a test export of a new file with one object and that comes out fine: https://imgur.com/a/sIip5H7
I see you've got it to work, did you have adjust some things in order to get it to work or should I just try reinstalling my installation of Inkscape?
I do however see that the lines in the exported pdf are somewhat thicker than the original, any ideas?
Sincerely, WeaselTrap
I will need the actual svg file containing a swatch.
Thanks.
Some pdf readers like Adobe will make lines appear heavier depending on zoom. (renders lines at 1px)
Ah oké, here you go: https://1drv.ms/u/s!AnQjZIfKY6zjhscSWKFWB08WUnppkA?e=Qr6s7w
Thanks for the info
Well, my bug theory is bust. But, I can tell you what's wrong with the breakout file:
Swatches are special one-stop gradients stored in the non-visible section of the svg file called the "defs".
The test2.svg file has a single swatch. The swatch looks like this in the defs:
Here is the swatch in the breakout box file (after cleaning* the document):
So, we can see there is a fair bit missing from the code for the gradient, like half.
If we insert the missing code into the document with a text editor, the objects carry over into the pdf.
I'm guessing the file was not originally from Inkscape, or it got saved as a pdf then got brought back into Inkscape. For whatever reason, the code is missing and trips-up the conversion process to pdf.
* File> Clean up document a.k.a. "Vacuum Defs"
The test2.svg file converts to PDF just fine here.
As far as I can see, the gradientTransform of type matrix is the issue here.
Deleting this code in line 36 and 129 in OP's original file (4way Breakout top.svg) makes this file also convert to PDF just fine here.
The file was originally created in Inkscape, but later had a .dxf imported in it so that has maybe caused it.
@Aero, thanks this is the solution to my problem, after deleting those lines from all the files they've exported without a problem! So thanks to both of you for your help.
Hello, I´ve got a similar problem with exporting from an SVG file.
Can you please PM me or contact via e-mail, I´ll share the whole file with you?
Thanks!
Hi again, I created a small version of my file deleting most content (the full file is 12 MB) but it still won´t work:
https://drive.google.com/file/d/1E_f5a10VeHxZ15oBIHIN2j7eIjggq_tu/view?usp=sharing
It seems that the problem concerns some designs I copied from a file created in some older version of Inkscape 2 years ago.
Can you please help? Thanks!
I tried deleting the "<linearGradient..." section in XML as I don´t use any gradients in my design. As a result, some objects lost their fill but I could change that manually. The pdf then exported ok, I´m just not sure if my action had no unwanted consequences that I haven´t noticed...
Tried a better method now, changed the colour in "<linearGradient..." section in XML to #ff00ff, that helped me to indetify most objects in question and remove the unwanted gradient from them. Still there are few more remaining. Is there an easy way how to relate an object highlighted in the Inkscape XML Editor view to the "real" object in the working space? Doing it visually would of course be ideal.
Typically, the objects selected in the xml are indicated in the workspace by the bounding box.
Inkscape also has tool like search, to find objects with specific attributes.
Thanks a lot for coming back to me!
That´s what I´d have expected but it does not happen in this case.
Tried searching for "linearGradient" (Value ID search enabled), found one object and amended it. Still there are some 9 "svg:linearGradient id" in the XML related to objects I can´t find.
I'd clean the document to see if those gradients are in use. If that fails, I'd try a text editor search to see if those gradients are in use.
How would I clean the document?
I see, thanks! It helped with some, but not all of them. Out of those remaining, most had no further occurence in the XML. 6 had occurences, I found 3 using the Search function but the rest can´t be found :(
Is this a different file? When I clean the file that is shared above, only one swatch remains, eight were removed.
Yes, I´m working on the full file, not on the sample. I just don´t want to share it publicly. Is there a way to send private messages? Or email?
You can click on my avatar to see my profile where there is an envelope button to send a DM. I'll reply back with my email addy, but check that you have email notifications enabled (those may land in your spam).
Sent, thanks!
Hi,
I have a similar issue.
Unfortunately, I don't understand the programming language you guys were using, so I couldn't really understand how you solved.
Hope you can help me out somehow.
Thank you.
@YHS, please describe your issue in detail.
Okay
I hope you can see it on the attached files, that I am making a business-card on Inkscape, Underneath the part that says "Hemerit's Ankh" (in golden writing) there is written "Event & Food" (in silver). However, when I try to save a pdf copy, only halve of the silver writing is shown.
The pdf looks ok here in adobe reader...
Thats so weird
Is it perhaps because I am using Mac?
It is likely your pdf reader does not manage the mesh gradient. I would try uploading to your print-house and see if the preview is also a problem.
I like the mesh gradient, but you could fallback to linear gradient with multiple stops.
Hi Tyler,
Thank you for the advice. I got the problem solved.
Hello,
I know that this post is quiet old but i have obtaine a similar issue during my use of Inkscape 0.92.
I had a lot of object (simple shape or text) that was missing after exporting in pdf format and even with a direct printing from Inkscape.
I have solved this issue by changing from "?" (unknown background) in the setup "font" from "background and outline" to "flat". And then i was able to export correctly the object that wasn't appeared precendtly. For the text, it's the same solution but in the setup "outline"
Hope that will help someone and that i had explain correctly my process.