Problems with PDF-creation

Post questions on how to use or achieve an effect in Inkscape.
Mar
Posts: 22
Joined: Thu Aug 13, 2009 4:06 am

Problems with PDF-creation

Postby Mar » Wed Aug 17, 2011 11:06 pm

Greetings,

I am in the process of converting an EPS file to a PDF through a number of intermediary steps. I can't get the Inkscape/Ghostscript import to work on my system (Windows 7 x64) but that's not the biggest problem (I can successfully convert by using a console window and running ps2pdf manually)...

My biggest problem is that the resulting PDF file is composed of a very large number of independent paths, each grouped individually. The time it takes to open this file in Adobe Reader is unacceptable. I have tried ungrouping the paths manually in Inkscape but the application crashes after a certain number of groups has been unfolded.
I'm not sure what my options are, I was hoping there was some way of ungrouping or "flattening" a file but it seems there's not. The image — a map — when saved to SVG is over 6 MB large.

Any ideas?

edit: I managed to get Inkscape to import EPS directly (I'm a haxxor....) but, unfortunately, still have the tons-of-groups issue.

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: Problems with PDF-creation

Postby Bucic » Sat Aug 27, 2011 9:16 pm

Have you got paths or objects or a mix of both in your svg?
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

Mar
Posts: 22
Joined: Thu Aug 13, 2009 4:06 am

Re: Problems with PDF-creation

Postby Mar » Mon Sep 05, 2011 11:57 pm

Only paths, no bitmaps.
It's during the import from EPS or AI that these groups are created. I'm guessing the SVG-format is using different concepts when it comes to groups, layers and independent shapes. For some reason it seems like the import procedure treats paths and even parts-of-paths as independent shapes and wraps them in groups, some times several times. For the most part the end result looks identical but due to this excessive wrapping the file size is much bigger than necessary.

I also believe that when re-exporting to PDF these groups are keps as defined in the SVG-file, which would explain why the produced PDF is so heavy to view.

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

Re: Problems with PDF-creation

Postby ~suv » Tue Sep 06, 2011 12:20 am

Without having access to an intermediary SVG variant (EPS -> SVG > PDF), it's difficult to estimate what could be recommended to 'flatten' the "image" in Inkscape before saving a copy as PDF.
Mar wrote:My biggest problem is that the resulting PDF file is composed of a very large number of independent paths, each grouped individually. The time it takes to open this file in Adobe Reader is unacceptable. I have tried ungrouping the paths manually in Inkscape but the application crashes after a certain number of groups has been unfolded.
Are these lines of the same stroke width/color, or are any of them significantly clipped or masked? You could try to select them all in 'Edit > Find…' (uncheck the default '[x] All types' and check only '[x] Paths') and then either combine the resulting selection into a single path (Ctrl+K) or group them (Ctrl+G) (which will pull them out of the various nested groups into a single one (somewhere within those nested ones -> 'Ctrl-Backspace' lets you select the wrapping group one level higher up to be able to pull that group to the top-level with 'Ctrl+X', change layer, 'Ctrl+Alt+V', or with 'Shift+PageUp'). With these commands it should be possible to get the paths out of the nested groups into a single path or group - but it doesn't consider clipped or masked paths of course (a sample file would have been helpful ;) ).

Mar
Posts: 22
Joined: Thu Aug 13, 2009 4:06 am

Re: Problems with PDF-creation

Postby Mar » Tue Sep 13, 2011 8:00 am

~suv, thank you, that is a great idea. I've never really tried the find-function. Didn't know that groups could be used in that way either. I will have a go at it and see what I come up with :)


Return to “Help with using Inkscape”