Hi all,
I have many figures similar to the attached Test1.pdf that I want to format/modify in inkscape (because in inkscape I can easily ungroup the whole pdf and move/remove objects freely) . Because I have a very basic problems I attached here 3 very straighforward examples: Test1, Test2 and Test3.
Test1 is how the original file looks like that I want to import into inkscape using the Poppler/Cairo import (I don't use the internal import because if I then save it again as a .pdf, all the data points are gone, it just exports empty graphs). After import, if I do not modify anything and I save it directly as a .pdf it looks like Test2.pdf, which looks a bit different than the original but still acceptable. When I do slight modifications: ungroup the object, move each graph to a different place, group them again and then save to .pdf, it looks like Test3 which is really not how it should look like.
There is some kind of blur in the data points in the graphs and I don't know how it got there and how to get rid of it.
I would be happy if anybody has a suggestion what I should do.
Thanks!!
Problem with modifying a specific .pdf file
Re: Problem with modifying a specific .pdf file
Either I don't understand the problem, or I can't reproduce it.
When you said you opened the file, ungrouped and moved some graphs, do you mean that where you moved them, is not where we see them, in Test3.pdf?
Attached is what I see in Test3.pdf, using Adobe Reader.
When you said you opened the file, ungrouped and moved some graphs, do you mean that where you moved them, is not where we see them, in Test3.pdf?
Attached is what I see in Test3.pdf, using Adobe Reader.
- Attachments
-
- test3.png (48.11 KiB) Viewed 2449 times
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Problem with modifying a specific .pdf file
Yes, I see the same as what you posted. So the problem is that the quality is very low. In Test1 you can see the individual dots and in Test3 everything is blurry.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Problem with modifying a specific .pdf file
Here's how I would proceed:
Open the original PDF using Internal import.
Ungroup everything repeatedly, until no more groups.
Clean the document (Menu: File>Clean up document)
Select the top chart image, it will say "Path 4 nodes" or such since it uses the image as a pattern fill.
Make a bitmap copy (Alt+B) of the selected chart and delete the original chart (Path 4 nodes) from underneath.
Repeat for the other charts.
Group the desired objects to move them about.
Save SVG as new file.
Save copy as pdf.
If the file crashes when saving as PDF, an original chart with image-pattern fill is still in the document and needs to be deleted.
Poppler Import vs. Internal

https://www.dropbox.com/s/emlzi6miyn5k0 ... d.pdf?dl=0
Open the original PDF using Internal import.
Ungroup everything repeatedly, until no more groups.
Clean the document (Menu: File>Clean up document)
Select the top chart image, it will say "Path 4 nodes" or such since it uses the image as a pattern fill.
Make a bitmap copy (Alt+B) of the selected chart and delete the original chart (Path 4 nodes) from underneath.
Repeat for the other charts.
Group the desired objects to move them about.
Save SVG as new file.
Save copy as pdf.
If the file crashes when saving as PDF, an original chart with image-pattern fill is still in the document and needs to be deleted.
Poppler Import vs. Internal

https://www.dropbox.com/s/emlzi6miyn5k0 ... d.pdf?dl=0
Last edited by tylerdurden on Fri Jun 15, 2018 1:34 am, edited 1 time in total.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Problem with modifying a specific .pdf file
Could it have probably something to do with rendering (shift+cmd+O)->Image rendering: OptimizeSpeed instead of optimizeQuality?
Cheers
P.
Cheers
P.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Problem with modifying a specific .pdf file
Maybe, but the screwy architecture of masks and images in the defs makes me think it isn't a simple issue (which Poppler seems to make even worse).
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Problem with modifying a specific .pdf file
For me, at least the first one is an image, not a pattern - but it's clipped, then masked, and only 256x256 px. So, yes, this is, in essence, an 'optimizeSpeed' vs. 'OptimizeQuality' issue.
The best way to fix this would be to export at a higher resolution from whatever plot program you are using.
Due to the mask, though, there's no way removing the mask can work, so to fix this, one would have to:
- ungroup the whole drawing once
- select the plot (Clone of image embedded + masked)
- release mask
- select mask and image below, both are clones (you may need to move the mask to the side or use Alt+Scrollwheel)
- unlink the clones
- right-click on both images, select 'Object properties', set the Image Rendering to 'optimize speed'
- reapply the mask
- now, it looks pixelated and crisp in Inkscape
- somehow, the pixelation isn't respected when I export it to pdf in my pdf viewers, but maybe it is in yours...
The best way to fix this would be to export at a higher resolution from whatever plot program you are using.
Due to the mask, though, there's no way removing the mask can work, so to fix this, one would have to:
- ungroup the whole drawing once
- select the plot (Clone of image embedded + masked)
- release mask
- select mask and image below, both are clones (you may need to move the mask to the side or use Alt+Scrollwheel)
- unlink the clones
- right-click on both images, select 'Object properties', set the Image Rendering to 'optimize speed'
- reapply the mask
- now, it looks pixelated and crisp in Inkscape
- somehow, the pixelation isn't respected when I export it to pdf in my pdf viewers, but maybe it is in yours...
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)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: Problem with modifying a specific .pdf file
Thanks a lot for your suggestions!
I tried it but when I make a bitmap copy the quality is extremely low. Your output is the image on the right? As soon as I make a bitmap copy the quality looks by far not as good as what you uploaded.
Is there a setting to keep a good quality when copying to bitmap?
Thanks!
I tried it but when I make a bitmap copy the quality is extremely low. Your output is the image on the right? As soon as I make a bitmap copy the quality looks by far not as good as what you uploaded.
Is there a setting to keep a good quality when copying to bitmap?
Thanks!
Re: Problem with modifying a specific .pdf file
Moini wrote:- right-click on both images, select 'Object properties', set the Image Rendering to 'optimize speed'
I believe you meant "OptimizeQuality" for the best rendering result and not OptimizeSpeed.
Cheers
P.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Problem with modifying a specific .pdf file
Niels wrote:Is there a setting to keep a good quality when copying to bitmap?
Yes, in the preferences menu: Bitmaps>Create>Resolution for Create Bitmap Copy...
I have it set for 300 dpi for this case, assuming it will go to print.
TD
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Problem with modifying a specific .pdf file
@Polygon: No, I meant optimizeSpeed. It's going to render a graphic crisp and blocky, which is what the user wants (instead of the blur that is created when Inkscape tries to upsample the image).
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)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: Problem with modifying a specific .pdf file
Thanks everybody for your help! I managed and I am happy with how it looks like now.
Highly appreciated!
Highly appreciated!