Hi,
I have a bit of confusion with an issue I'm having, and I'm hoping someone can point me in the right direction. I've STFW, and I think my problem may be specific (and unique) enough that I can't find a solution.
I am editing an image with Inkscape, and when I finish editing the image with Inkscape and export to a PNG, it comes out exactly how I'd like it to look (see below).
http://imgur.com/IX5IJ.png
However, I'd like to directly export the image to a PDF from Inkscape, and this is where the trouble comes in (see below...again).
http://imgur.com/cEUT0.png
I created those lines as part of the image (so I guess they're supposed to be there), but they are always cut off by the axes, as shown in the first image (which is how the SVG looks when loaded in Inkscape). However, as soon as I export the image to PDF directly using Cairo, the axes no longer cut off the line, which I've never seen before.
I've attempted to first export the image to PNG, then convert to a PDF, and while I don't have problems with the line overlapping the axes, it doesn't conserve the image quality as well as I would like. The best solution I have found so far is exporting directly to PDF using Cairo, except for this one little issue.
Thanks.
Image artifacts when converting to PDF
Re: Image artifacts when converting to PDF
Welcome to the forums.
Have you tried converting the stroke into a path? Go to Path->Stroke to Path. Once it is a path you can either move the end nodes so that they finish at the axis, or use one of the Path cutting functions like Intersection (Path->Intersection) to cut off the areas that aren't required.
To use Intersection draw a box over the areas of the line (now a path) that you want to keep. Select both this new box and the line, and go to Path->Intersection
Have you tried converting the stroke into a path? Go to Path->Stroke to Path. Once it is a path you can either move the end nodes so that they finish at the axis, or use one of the Path cutting functions like Intersection (Path->Intersection) to cut off the areas that aren't required.
To use Intersection draw a box over the areas of the line (now a path) that you want to keep. Select both this new box and the line, and go to Path->Intersection
-
- Posts: 3
- Joined: Tue Aug 25, 2009 10:33 am
Re: Image artifacts when converting to PDF
Pureon wrote:Welcome to the forums.
Have you tried converting the stroke into a path? Go to Path->Stroke to Path. Once it is a path you can either move the end nodes so that they finish at the axis, or use one of the Path cutting functions like Intersection (Path->Intersection) to cut off the areas that aren't required.
To use Intersection draw a box over the areas of the line (now a path) that you want to keep. Select both this new box and the line, and go to Path->Intersection
When I use the command Path->Stroke to Path, Inkscape tells me "No stroked paths in the selection."
I also used the command Path->Object to Path (since I though it might actually be an object), and Inkscape told me "No objects to convert to path in the selection".
I created those lines in a program outside of Inkscape (matplotlib, if that's helpful), and then exported the whole thing to Inkscape (I'm using Inkscape to fix the axis ticks and labels...I'm not touching the actual plot or the lines that I'm having trouble with), so I assumed it would be an "object", but I guess not.
However, I'm not sure if your solution would have been helpful, since when I select the line in Inkscape (which actually consists of two separate lines connected in the middle), it is already cut off at the axis, so there would be nothing to intersect. I'm not sure changing the nodes would have helped either,since the nodes are already where I want them (at the axis).
Thanks for your input though. If you have anymore suggestions, I'd be glad to hear them. I'll probably play around a bit more and see if I can solve the problem.
Re: Image artifacts when converting to PDF
What does the status line (at the bottom of the Inkscape window) say? Is it a path, a shape, a group? Any messages about the object being filtered, clipped or masked? You could also check the attributes in the 'Fill and Stroke' dialog - any transparency or opacity applied to fill or stroke paint?marcusesses wrote:when I select the line in Inkscape (which actually consists of two separate lines connected in the middle), it is already cut off at the axis, so there would be nothing to intersect. I'm not sure changing the nodes would have helped either,since the nodes are already where I want them (at the axis).
I don't understand - could you explain what connects those separate lines? A third path? Or do you mean it's a rectangle or closed path with a black fill?(which actually consists of two separate lines connected in the middle)
-
- Posts: 3
- Joined: Tue Aug 25, 2009 10:33 am
Re: Image artifacts when converting to PDF
OK, I've solved my problem.
~suv, it was two diagonal lines that were placed in such a way to make it look like it was one line (but if I wanted to modify the lines, I would have to click them separately to do so). They weren't connected by any method, they were just aligned in such a way to make it appear to be a single line. I hope that made sense....
Anyway, my solution was a bit...inelegant.
I created a single diagonal line, and I placed the newly created line in the same position as the old lines. I then erased the old diagonal lines. This way, I was assured that what I saw in my Inkscape window is what I would see as a PDF.
I then eliminated any bits of the line that were past the axis using Pureon's suggestion of Path->Intersection (with a rectangle aligned with the axis). I exported the SVG to a PDF, and it looks how I want it to look.
I didn't check whether the lines were masked, filtered, etc. before I deleted them, ~suv. I found my makeshift solution before I checked the forum again.
Thanks ~suv and Pureon!
~suv, it was two diagonal lines that were placed in such a way to make it look like it was one line (but if I wanted to modify the lines, I would have to click them separately to do so). They weren't connected by any method, they were just aligned in such a way to make it appear to be a single line. I hope that made sense....
Anyway, my solution was a bit...inelegant.
I created a single diagonal line, and I placed the newly created line in the same position as the old lines. I then erased the old diagonal lines. This way, I was assured that what I saw in my Inkscape window is what I would see as a PDF.
I then eliminated any bits of the line that were past the axis using Pureon's suggestion of Path->Intersection (with a rectangle aligned with the axis). I exported the SVG to a PDF, and it looks how I want it to look.
I didn't check whether the lines were masked, filtered, etc. before I deleted them, ~suv. I found my makeshift solution before I checked the forum again.
Thanks ~suv and Pureon!
Re: Image artifacts when converting to PDF
Glad you got it working!