[solved] Problem printing with pattern fill

Post questions on how to use or achieve an effect in Inkscape.
2wicked
Posts: 21
Joined: Wed Jun 18, 2014 6:59 pm

[solved] Problem printing with pattern fill

Postby 2wicked » Mon Nov 02, 2015 11:53 pm

Dear forum members,

I created a file with a mm grid with thicker cm lines. I created a small part of the grid and used pattern fill. In Inkscape it looks o.k., but when I print (to pdf) or save to pdf the pattern fill is not displayed correctly.

Image

I had a similar problem before and got it fixed by combining the paths, but if I do that on this file the thicker cm lines disappear because all lines get the same stroke width.

This is my .svg file
https://www.dropbox.com/s/02vj3ng1l52xtdy/Testcentrum%20A4%20grid%20mm%20%2B%20rulers%20alt.svg?dl=0&s=sl

Does anybody know how I can fix this? Thanks in advance.

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

Re: Problem printing with pattern fill

Postby Moini » Tue Nov 03, 2015 1:11 am

Works if you convert stroke to path and union the lines (don't include the rectangles ;) - else the union will only give you a blank rectangle) before you convert to pattern.

Not sure why, though - I know there's a bug related to small stroke width, but it seems to need the union - only converting to stroke to path alone and grouping does not work (and unioning with different stroke widths doesn't make sense, as then all strokes will look the same).
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)

2wicked
Posts: 21
Joined: Wed Jun 18, 2014 6:59 pm

Re: Problem printing with pattern fill

Postby 2wicked » Tue Nov 03, 2015 1:40 am

Hi Moini,

I got this as unit cell for the pattern:

Image

If I do 'stroke to path' and then 'combine' this results in a square with just nodes where the end points of the lines used to be.

Image

I don't understand what you mean by don't include the rectangles.

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

Re: Problem printing with pattern fill

Postby Moini » Tue Nov 03, 2015 2:37 am

If you select everything (doing rubberband selection), and look at the bottom, you see 'xx paths and rectangles' in the status line.
You only want the paths for union, not the rectangles (else everything will be unioned into one rectangle, as in your picture above ;) )

Select the paths only by following this:
- click on one path (after converting all strokes to paths)
- right click on it
- select 'Select same -> Fill + Stroke' in the context menu.
- look into the status bar. The selection will now only contain the paths, not the transparent rectangles below them.
- Now do the union.

(if you just do 'Path -> Combine' instead of union, including the rectangles, that will keep some unneeded stuff in the pattern - try to change the fill color to see it. It's cleaner to only keep what you really need).
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)

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Problem printing with pattern fill

Postby ~suv » Tue Nov 03, 2015 2:45 am

As far as I can tell this is related to [ Based on what we know for now, the problem is not really in Inkscape itself, but was introduced with more recent versions of the graphics library Inkscape uses for PDF export/printing. Saving a copy as PDF with an Inkscape build which uses cairo < 1.12 does produce a correct pattern fill (the scaling relative to the rulers with the yellow background is slightly off though - that turned out to be poor rendering as preview - properly opened, the PDF file renders as expected). ]

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Problem printing with pattern fill

Postby ~suv » Tue Nov 03, 2015 3:07 am

Attaching two PDFs - one saved as copy with Inkscape 0.48.2 for Mac OS X (includes cairo 1.10), and one converted with the command line tool 'rsvg-convert' using current stable cairo 1.14.4 (we known that the command line tool is not affected by the problem which is triggered with Inkscape).
Attachments
2wicked-Testcentrum A4 grid mm + rulers alt-0482-cairo-1_10_2.pdf
(21.94 KiB) Downloaded 261 times
2wicked-Testcentrum A4 grid mm + rulers alt-rsvg-cairo-1_14_4.pdf
(21.47 KiB) Downloaded 256 times

2wicked
Posts: 21
Joined: Wed Jun 18, 2014 6:59 pm

Re: Problem printing with pattern fill

Postby 2wicked » Wed Nov 04, 2015 5:32 pm

Thanks for your help all. Much appreciated

tc68
Posts: 3
Joined: Thu Jun 30, 2016 3:29 pm

Re: [solved] Problem printing with pattern fill

Postby tc68 » Thu Jun 30, 2016 3:37 pm

Hi

I am fairly new to Inkscape, but love it. Using version 0.91 on windows 8.1

I am also having this problem saving as pdf - I have been using the patterns from USGS for geological rock symbols (https://blogs.otago.ac.nz/si-geology/re ... load-link/). They look great on the screen but when saving as a pdf the patterns fail to tile successfully.

I have a workaround for the problem, which is to export as a PNG file then import into another program (e.g. libreOffice Writer) and save as a PDF from there. A bit clunky but a nice file as a result.

Is this an issue that is likely to be addressed soon? it is a significant one for me and anyone else wishing to incorporate inkscape drawings into professional reports as PDF files.

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: [solved] Problem printing with pattern fill

Postby Simarilius » Thu Jun 30, 2016 5:30 pm

tc68 wrote:Hi
Is this an issue that is likely to be addressed soon? it is a significant one for me and anyone else wishing to incorporate inkscape drawings into professional reports as PDF files.


Your much better asking that on the bug on launchpad rather than here, as thats what the devs will see. Looking at launchpad its still listed as open and unassigned, so no ones picked it up to fix yet.

tc68
Posts: 3
Joined: Thu Jun 30, 2016 3:29 pm

Re: [solved] Problem printing with pattern fill

Postby tc68 » Fri Jul 01, 2016 10:13 am

Thanks

I'll give it a push over there

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: [solved] Problem printing with pattern fill

Postby druban » Fri Jul 01, 2016 1:29 pm

TC68, I'm sorry you're having this problem, it seems an odd thing to have escaped the attention of the bug fixers. It shows up in all the versions I have.

As for your PNG workaround, there is an internal to inkscape equivalent - select all, make bitmap copy, dlete everything but the bitmap and save as PDF. The resolution is settable in prefs, although setting it high makes a very heavy file.

For PDF output patterns are out for now it seems. There is a workaround using tiled clones and clipping paths but it will necessitate a whole lot of preliminary work to get to the level of the template you are using.
Your mind is what you think it is.


Return to “Help with using Inkscape”