Hello everyone,
I have seen this issue posted elsewhere, but I have not been able to find a solution. I am trying to export a .svg file that contains shapes with pattern fills to a .pdf file. Unfortunately, the shapes in the exported PDF do not have their original pattern fill, but are blank or nearly blank with bits and pieces of the original fill pattern. I've attached a sample .svg and exported .pdf.
I am currently running Mac OSX 10.9.5, Inkscape 0.48.5, and XQuartz 2.7.7 (w/ cairo 1.12.16). This issue does not occur in the same Inkscape release for Windows, nor did it occur on my previous install of OSX 10.7 with the Apple-issued X11, which leads me to believe the problem lies with XQuartz or cairo. I've tried installing previous versions of XQuartz (down to 2.7.2), but nothing helped.
Thanks very much for your help.
Pattern fills lost during export to PDF
Pattern fills lost during export to PDF
- Attachments
-
- test_pattern.pdf
- (1.87 KiB) Downloaded 297 times
-
- test_pattern.svg
- (16.02 KiB) Downloaded 273 times
Re: Pattern fills lost during export to PDF
Hi.
Have you tried to make patterms from filled paths with no outlines instead?
Do the built-in patterns produce the issue?
Bits of the original pattern fill sounds a rendering issue of the pdf viewer.
In current stabile inkscape it can produce errors as well, if the base object involved clipping for example.
Have you tried to make patterms from filled paths with no outlines instead?
Do the built-in patterns produce the issue?
Bits of the original pattern fill sounds a rendering issue of the pdf viewer.
In current stabile inkscape it can produce errors as well, if the base object involved clipping for example.
- Attachments
-
- test_pattern2.svg
- (71.79 KiB) Downloaded 251 times
Re: Pattern fills lost during export to PDF
Objects with patterns and no outlines (I think this is what you're asking about?) -> does not export correct
Objects with built-in patterns -> exports correctly!
The file you attached -> exports correctly!
I'm not sure what is different about your file that is causing the pattern to export correctly.
I've made my patterns by drawing the parts, grouping the objects, and then using 'objects to pattern'. It seems that if I draw the parts, combine the paths, and then use 'objects to pattern', it exports correctly. I don't know why that makes a difference. I'm hesitant to do this for all my patterns though, and it doesn't explain why it works on some operating systems but not mine.
Objects with built-in patterns -> exports correctly!
The file you attached -> exports correctly!
I'm not sure what is different about your file that is causing the pattern to export correctly.
I've made my patterns by drawing the parts, grouping the objects, and then using 'objects to pattern'. It seems that if I draw the parts, combine the paths, and then use 'objects to pattern', it exports correctly. I don't know why that makes a difference. I'm hesitant to do this for all my patterns though, and it doesn't explain why it works on some operating systems but not mine.
Re: Pattern fills lost during export to PDF
Your attached svg had a pattern made of several paths with strokes and no fills, grouped together.
The svg I attached has two solution for the same thing.
Both of them are made by converting the strokes to paths, and retracing some parts to reduce nodes at the miters.
One of them is using the combine option, the other was made with the boolean Ctrl++.
Removing of the grouping made it work because default pattern fills such as the parallel lines are made up from paths with strokes and no fills as far as I remember -can be reached through the xml editor.
I don't know if there is a difference in the pdf codes made with the same versions on different systems, I'm guessing it is more likely that they are both the same, and the pdf viewer you use differ.
The svg I attached has two solution for the same thing.
Both of them are made by converting the strokes to paths, and retracing some parts to reduce nodes at the miters.
One of them is using the combine option, the other was made with the boolean Ctrl++.
Removing of the grouping made it work because default pattern fills such as the parallel lines are made up from paths with strokes and no fills as far as I remember -can be reached through the xml editor.
I don't know if there is a difference in the pdf codes made with the same versions on different systems, I'm guessing it is more likely that they are both the same, and the pdf viewer you use differ.
Re: Pattern fills lost during export to PDF
Thanks. It looks like your solution to convert the pattern strokes to paths and combine is working. I'm still confused why this is a problem on my operating system and various program versions. I'm using Preview to view the PDF, which is what I used before on OS X 10.7, when this wasn't an issue. The only major difference between the OS X versions is X11 vs. XQuartz. I'm not sure what windows uses to create the PDFs.
Re: Pattern fills lost during export to PDF
Win uses acrobat reader. An alternative to it is foxit reader, that has a better rendering.
I'm running on opensuse, where evince is the default pdf viewer -which uses poppler/cairo. Chrome browser can give a better rendering in my opinion than evince.
I'm running on opensuse, where evince is the default pdf viewer -which uses poppler/cairo. Chrome browser can give a better rendering in my opinion than evince.