Crop EMF File via commandline

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
Michael J.

Crop EMF File via commandline

Postby Michael J. » Thu Mar 12, 2009 7:00 pm

Hi there!
I have an some EMF files with a background thats 200x200 pixel but the content is smaller (depends on the graphic).
I now want to programmatically crop/resize the EMF file so that it fits the content. Using the GUI this is possible following these steps:

1. open source EMF
2. mark all content and open document options (CRTL+SHIFT+D)
3. click "fit page in selection" (don't know if thats the correct translation, in german its called "Seite in Auswahl einpassen")
4. Save as EMF File.

I would like to reproduce this action via commandline but haben't found any command for that.
What I found out is that I can do this resizing/cropping when i export the result as PNG with commandline using this command

inkscape C:\input.emf --export-png=C:\result.png --export-area-drawing

Can somebody please tell me if it's possible to do what I want and when yes how to do this?

michaelkatz

Re: Crop EMF File via commandline

Postby michaelkatz » Sun Dec 06, 2009 4:57 pm

Thanks for this tip.

holloway
Posts: 3
Joined: Fri Oct 22, 2010 12:16 pm

Re: Crop EMF File via commandline

Postby holloway » Tue Nov 02, 2010 11:12 am

michaelkatz wrote:Thanks for this tip.

Just so you know this only works on Windows because only the Windows versions of Inkscape supports EMF.


Return to “Discuss Software Issues”