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.
Problems with PDF-creation
Re: Problems with PDF-creation
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
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l
Re: Problems with PDF-creation
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.
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.
Re: Problems with PDF-creation
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.
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 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.
Re: Problems with PDF-creation
~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