Save As EMF Moves Graphic Off Center
Save As EMF Moves Graphic Off Center
Using Inkscape 0.48, when I take an SVG and do a SaveAs to EMF, the resulting graphic shifts and is off center.
What do I have to do to make sure it's centered? It used to work fine for me in the past, so something has inadvertently been changed. It also worked fine using Inkscape 0.91, but we have to use 0.48 because 0.91 does some things we don't like.
The screen capture below illustrates what the original file looks like in Inkscape, what the off center rectangle looks like when the saved EMF is opened in Paint, and what the same EMF looks like when used as a picture marker symbol in my application.
Thanks
--Andy
What do I have to do to make sure it's centered? It used to work fine for me in the past, so something has inadvertently been changed. It also worked fine using Inkscape 0.91, but we have to use 0.48 because 0.91 does some things we don't like.
The screen capture below illustrates what the original file looks like in Inkscape, what the off center rectangle looks like when the saved EMF is opened in Paint, and what the same EMF looks like when used as a picture marker symbol in my application.
Thanks
--Andy
Re: Save As EMF Moves Graphic Off Center
What I used to see was an EMF, saved from Inkscape, and used in my application, centered on the circle, The EMF is somehow now being created with the rectangle shifted off the center of its envelope/canvas/art board. I recently uninstalled 0.91 and installed 0.48. Is there a setting somewhere that I have to use to ensure the same artboard is used in the EMF?
Re: Save As EMF Moves Graphic Off Center
Hhmm...well it sounds like everything should be working. But it's hard to tell from screenshots.
Have you gone through your usual process a 2nd or 3rd time, just to be sure? If so, can you provide the SVG file for us? All we can help with is Inkscape. But we can make sure the rectangle is centered properly.
Are there any raster images in your usual routine? A vector rectangle would not be expected to change or move. But if there are any raster images involved, there was a change in how they are handled from 0.48 to 0.91, which might make it seem like something was moved.
Or maybe you used a different template or page size?
Have you gone through your usual process a 2nd or 3rd time, just to be sure? If so, can you provide the SVG file for us? All we can help with is Inkscape. But we can make sure the rectangle is centered properly.
Are there any raster images in your usual routine? A vector rectangle would not be expected to change or move. But if there are any raster images involved, there was a change in how they are handled from 0.48 to 0.91, which might make it seem like something was moved.
Or maybe you used a different template or page size?
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: Save As EMF Moves Graphic Off Center
Here is the SVG. The process is simply to Save As and select EMF as the file type and specify a file name. I have repeated this several times. I have also done a batch export to EMF of a folder tree of SVG files, using the Inkscape 0.48 command line, and ALL of the resulting EMFs are offset from center the same distance and direction.
When I uninstalled 0.91 and installed 0.48 I didn't manually delete the 0.91 installation folders. Maybe it left some setting that has now confused 0.48?
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Version_1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" width="612px" height="792px" viewBox="0 0 612 792" enable-background="new 0 0 612 792" xml:space="preserve">
<g id="frame">
<rect id="_x3C_path_x3E_" x="126.082" y="276" fill="#80E0FF" stroke="#000000" stroke-width="5" width="360" height="240"/>
</g>
</svg>
When I uninstalled 0.91 and installed 0.48 I didn't manually delete the 0.91 installation folders. Maybe it left some setting that has now confused 0.48?
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Version_1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" width="612px" height="792px" viewBox="0 0 612 792" enable-background="new 0 0 612 792" xml:space="preserve">
<g id="frame">
<rect id="_x3C_path_x3E_" x="126.082" y="276" fill="#80E0FF" stroke="#000000" stroke-width="5" width="360" height="240"/>
</g>
</svg>
Re: Save As EMF Moves Graphic Off Center
Hello
Looking in Launchpad, a related bug:
https://bugs.launchpad.net/inkscape/+bug/1284434
But I can't find nothing relevant for solving or a work around.
Using Inkscape 0.91 in Ubuntu
I've opened your sample in libre office Draw. It supports centimetes but not pixels.
- On Inkscape, changing the units of the EMF document, it shows: 17,272 x 22,352 cm
- On Libre Office Draw, checking the units in Position and Size Dialog: 17,3 x 22,4 cm
- The original SVG file with the units in cm: 17,272 x 22,352 cm.
What I see it's a small change of scaling, but nothing like adding more white space.
- Is the application developed by you or from some other else?
- In which version of Windows you are?
- There are ways to change the setup of Inkscape. Please consult here:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... omize.html
- An idea: besides of the background of inkscape, use a transparent rectangle with the measures you want for "white space"
Looking in Launchpad, a related bug:
https://bugs.launchpad.net/inkscape/+bug/1284434
But I can't find nothing relevant for solving or a work around.
Using Inkscape 0.91 in Ubuntu
I've opened your sample in libre office Draw. It supports centimetes but not pixels.
- On Inkscape, changing the units of the EMF document, it shows: 17,272 x 22,352 cm
- On Libre Office Draw, checking the units in Position and Size Dialog: 17,3 x 22,4 cm
- The original SVG file with the units in cm: 17,272 x 22,352 cm.
What I see it's a small change of scaling, but nothing like adding more white space.
- Is the application developed by you or from some other else?
- In which version of Windows you are?
- There are ways to change the setup of Inkscape. Please consult here:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... omize.html
- An idea: besides of the background of inkscape, use a transparent rectangle with the measures you want for "white space"
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: Save As EMF Moves Graphic Off Center
Thanks for investigating and replying. The app is developed by our company, but the version I'm running hasn't changed. What has changed is the version of Inkscape I'm running and the EMF, which when opened in MS Paint exhibits more white space on two sides.
I'm going to uninstall 0.48, delete everything I can find related to the install, then install fresh.
I'm using Windows 8.1 Enterprise.
I'm going to uninstall 0.48, delete everything I can find related to the install, then install fresh.
I'm using Windows 8.1 Enterprise.
Re: Save As EMF Moves Graphic Off Center
Hello
- If you can try what I suggested last
- If you manage to solve it in another way please share here
- If not, also share here
Good luck
- If you can try what I suggested last
- If you manage to solve it in another way please share here
- If not, also share here
Good luck
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: Save As EMF Moves Graphic Off Center
I don't know what to do with the code you provided. Could you just upload the SVG file, either as an attachment here or somewhere else and give us the link?
However, by looking at the code, it appears this SVG file was created with Illustrator. I would suggest opening in Inkscape, then copy the rectangle and paste into a brand new Inkscape document, and save as SVG, then that should eliminate any data from AI that might be coming through.
However, by looking at the code, it appears this SVG file was created with Illustrator. I would suggest opening in Inkscape, then copy the rectangle and paste into a brand new Inkscape document, and save as SVG, then that should eliminate any data from AI that might be coming through.
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: Save As EMF Moves Graphic Off Center
Brynn,
You could be right about that Adobe Illustrator thing, because now I see an "enable-background" property in the SVG code. So far, it's the only non-Inkscape property I see, and honestly I don't think it's important when exporting to EMF. But I might be wrong.
I hope to see if abouffard manage to solve the problem. Like I said before, adding a white or transparent rectangle for blank-background space could help to solve the problem. My idea is that the blank space is modified when exporting. If that space is filled, that alignment problem will disappear... but It's just a big guess
You could be right about that Adobe Illustrator thing, because now I see an "enable-background" property in the SVG code. So far, it's the only non-Inkscape property I see, and honestly I don't think it's important when exporting to EMF. But I might be wrong.
I hope to see if abouffard manage to solve the problem. Like I said before, adding a white or transparent rectangle for blank-background space could help to solve the problem. My idea is that the blank space is modified when exporting. If that space is filled, that alignment problem will disappear... but It's just a big guess
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: Save As EMF Moves Graphic Off Center
I've looked at all the setup doc that hulf2012 suggested and can't find anything that affects what I am experiencing.
I've placed the original SVG and the resulting EMF on DropBox, together with a zip of my user preferences.
https://www.dropbox.com/sh/eyhaxj0egn0nl6j/AAA8BuNvBDV4rI2bqoF6EIfQa?dl=0
I am running 0.48.5 r10040 on a WIndows 8.1 Enterprise machine.
I am using the 7Zip packaged version and have also installed it on another Windows 10 machine where the problem does not exist. On my Windows 10 machine the blue rectangle is centered in the EMF canvas. On a colleagues' Windows 7 machine, again, the rectangle is centered. Prior to installing and running with the 0.91 version for a bit, I did not have this problem either with 0.48.5. The 0.91 version does not have this problem as far as I can tell.
The Illustrator info in the SVG has been there since the beginning of our project (because they were originally built in Illustrator) and did not prevent my previous install of 0.98.5 from working properly or my colleague's 0.98.5.
I seem to only have had the problem since switching to 0.91 and then trying to switch back.
I've placed the original SVG and the resulting EMF on DropBox, together with a zip of my user preferences.
https://www.dropbox.com/sh/eyhaxj0egn0nl6j/AAA8BuNvBDV4rI2bqoF6EIfQa?dl=0
I am running 0.48.5 r10040 on a WIndows 8.1 Enterprise machine.
I am using the 7Zip packaged version and have also installed it on another Windows 10 machine where the problem does not exist. On my Windows 10 machine the blue rectangle is centered in the EMF canvas. On a colleagues' Windows 7 machine, again, the rectangle is centered. Prior to installing and running with the 0.91 version for a bit, I did not have this problem either with 0.48.5. The 0.91 version does not have this problem as far as I can tell.
The Illustrator info in the SVG has been there since the beginning of our project (because they were originally built in Illustrator) and did not prevent my previous install of 0.98.5 from working properly or my colleague's 0.98.5.
I seem to only have had the problem since switching to 0.91 and then trying to switch back.
Re: Save As EMF Moves Graphic Off Center
I've now thrown into the DropBox folder a copy of the EMF file created by 0.48.5 on my Windows 10 machine. This is how it used to look on my Windows 8.1 machine. I'll push the user preferences too. I suppose a diff between the two preference folders might show something.
Re: Save As EMF Moves Graphic Off Center
Having read through this bug: https://bugs.launchpad.net/inkscape/+bug/1284434 my experience is largely the same. The EMF Save As worked like a charm for the longest time and then something happened and since then all saved EMFs on my machine end up with extra white space below and to the right.
Any further help greatly appreciated. We can't/won't switch to 0.91 because we have some other issues with the way it is creating its EMFs.
Apart from this sudden odd result, 0.48.5 worked/works great for us.
Any further help greatly appreciated. We can't/won't switch to 0.91 because we have some other issues with the way it is creating its EMFs.
Apart from this sudden odd result, 0.48.5 worked/works great for us.
Re: Save As EMF Moves Graphic Off Center
When I export your SVG, it's pretty close to the center. Here's a screenshot comparing yours to mine (using Irfanview to open them). I don't know what accounts for the difference in size. At first I thought it was just a different zoom factor. But the titlebar shows they are nearly the same. It must be some other difference between your and my systems (resolution, etc.)
This would point to something on your system or your Inkscape preferences. I'm afraid I can't read the preferences.xml file in any meaningful way.
I wonder if you had changed Inkscape Preferences > Input/Output > SVG Output if that could cause this problem. I'm pretty sure this is a new option for 0.91. Mine's set to Optimized.
Here's the release notes for 0.91, so you can peruse for any change that might be contributing to this problem. Much of that info is over my head, so I can't help much with it. http://wiki.inkscape.org/wiki/index.php ... notes/0.91
Oh, I see you posted while I was testing and typing. I hope you can get some help from the bug report.
This would point to something on your system or your Inkscape preferences. I'm afraid I can't read the preferences.xml file in any meaningful way.
I wonder if you had changed Inkscape Preferences > Input/Output > SVG Output if that could cause this problem. I'm pretty sure this is a new option for 0.91. Mine's set to Optimized.
Here's the release notes for 0.91, so you can peruse for any change that might be contributing to this problem. Much of that info is over my head, so I can't help much with it. http://wiki.inkscape.org/wiki/index.php ... notes/0.91
Oh, I see you posted while I was testing and typing. I hope you can get some help from the bug report.
- Attachments
-
- emftest.png (60.56 KiB) Viewed 2993 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: Save As EMF Moves Graphic Off Center
Thanks Brynn.
Your EMF is identical to what I used to get and to what my other colleagues still get. It's the same as I get on a fresh install on another machine (my Windows 10 box).
Did you do that on your 0.91? Because on 0.91 I'm not seeing the problem. Only with 0.48.5 do I now have the problem, and only on one machine, even if I blow away the user Inkscape preferences folder. I'm wondering if there is another place Inkscape is getting preferences from or there is some Windows EMF template or setting its using that needs finding and adjusting.
Your EMF is identical to what I used to get and to what my other colleagues still get. It's the same as I get on a fresh install on another machine (my Windows 10 box).
Did you do that on your 0.91? Because on 0.91 I'm not seeing the problem. Only with 0.48.5 do I now have the problem, and only on one machine, even if I blow away the user Inkscape preferences folder. I'm wondering if there is another place Inkscape is getting preferences from or there is some Windows EMF template or setting its using that needs finding and adjusting.
Re: Save As EMF Moves Graphic Off Center
Oh sorry. Yes, that's with 0.91, 32-bit on Windows 7. I have a 0.48.5 version, so in a few minutes, I'll test with it.
I don't know of any other settings, besides in Inkscape Preferences.
I don't know of any other settings, besides in Inkscape Preferences.
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: Save As EMF Moves Graphic Off Center
No, I get the same, correct result with 0.48.5.
What little I read of that bug report, it doesn't sound like it always happens. Maybe tomorrow, or maybe next week, it will be back to working correctly. Who knows?! (Yes, I've seen intermittent bugs -- and they're the hardest to fix, because the developers can't pin down where the problem is.)
I wouldn't be a bit surprised if you don't find a way to fix it yourself, eventually. You do seem tenacious Of course I realize getting your work done is a major motivation
(I did read a recent message where deleting the prefs file did not restore defaults. That was for Inks Prefs > Input/Output > SVG Output > Numeric precision. The person had changed it, and forgot, and was doing everything to restore defaults. Luckily someone had the answer for him, because we were a step away from filing a bug report. No one ever answered why deleting the file did not restore that one option to the default. However, I don't see how that option could have anything to do with..... well.....maybe it could.... (I don't clearly understand how it works.) Have you ever changed that one? Default is 8, I think.)
What little I read of that bug report, it doesn't sound like it always happens. Maybe tomorrow, or maybe next week, it will be back to working correctly. Who knows?! (Yes, I've seen intermittent bugs -- and they're the hardest to fix, because the developers can't pin down where the problem is.)
I wouldn't be a bit surprised if you don't find a way to fix it yourself, eventually. You do seem tenacious Of course I realize getting your work done is a major motivation
(I did read a recent message where deleting the prefs file did not restore defaults. That was for Inks Prefs > Input/Output > SVG Output > Numeric precision. The person had changed it, and forgot, and was doing everything to restore defaults. Luckily someone had the answer for him, because we were a step away from filing a bug report. No one ever answered why deleting the file did not restore that one option to the default. However, I don't see how that option could have anything to do with..... well.....maybe it could.... (I don't clearly understand how it works.) Have you ever changed that one? Default is 8, I think.)
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: Save As EMF Moves Graphic Off Center
Yea, I've checked that preference and mine says 8. I even copied my Windows 10 preference XML file to my Windows 8.1 machine to no effect.
It is pretty critical to my job. We pretty regularly convert 1000's of SVG files to EMF. So if I can't reliably do that and have to rely on colleagues to do it for me then we'll have to investigate alternative conversion tools.
It is pretty critical to my job. We pretty regularly convert 1000's of SVG files to EMF. So if I can't reliably do that and have to rely on colleagues to do it for me then we'll have to investigate alternative conversion tools.
Re: Save As EMF Moves Graphic Off Center
Let's take this problem to the Inkscape Users mailing list. Many of the people who participate on that list are advanced Inkscape users, and many developers read it as well. Maybe someone will have a tip? Or maybe it will get some developer interested in working on it.
If you don't want to use the list, I could post the question for you. Although it would be better if you communicated directly. You can give a link to this thread, along with all the usual info (operating s ystem, Inkscape version, etc.) and a link to your files on dropbox. And be sure to say that you'll be forced to use another program, if this can't be fixed, or a workaround found. Or you could post to the development list - https://inkscape.org/en/community/mailing-lists/
I re-read the bug report you mentioned, and noticed that you didn't include your files, with your comment. If you can give them new files for testing, it might entice someone to have a look. I mean just a PNG showing the offset and the SVG file. If they need anything else, they'll ask for it. I think uploading the files to Launchpad would be better, but if nothing else, post a link to the dropbox files.
I searched the internet and found this - http://graphicdesign.stackexchange.com/ ... ss-of-data I don't think the first of those solutions is reasonable, since it involves an extra step. However, LibreOffice is free and open source. If your SVGs can be opened or imported, it's at least worth a try!
If you don't want to use the list, I could post the question for you. Although it would be better if you communicated directly. You can give a link to this thread, along with all the usual info (operating s ystem, Inkscape version, etc.) and a link to your files on dropbox. And be sure to say that you'll be forced to use another program, if this can't be fixed, or a workaround found. Or you could post to the development list - https://inkscape.org/en/community/mailing-lists/
I re-read the bug report you mentioned, and noticed that you didn't include your files, with your comment. If you can give them new files for testing, it might entice someone to have a look. I mean just a PNG showing the offset and the SVG file. If they need anything else, they'll ask for it. I think uploading the files to Launchpad would be better, but if nothing else, post a link to the dropbox files.
I searched the internet and found this - http://graphicdesign.stackexchange.com/ ... ss-of-data I don't think the first of those solutions is reasonable, since it involves an extra step. However, LibreOffice is free and open source. If your SVGs can be opened or imported, it's at least worth a try!
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: Save As EMF Moves Graphic Off Center
Also attach the emf file
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)