Different object sizes in Inkscape vs Illustrator?

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.
DavidWinter
Posts: 2
Joined: Wed Jan 25, 2012 12:58 am

Different object sizes in Inkscape vs Illustrator?

Postby DavidWinter » Wed Jan 25, 2012 1:12 am

Hello there.

I'm not sure if this is the correct forum for this post, if not, please move it to the correct location.

I own a small company that creates decals for scale model aircraft. I do all my artwork in Inkscape however the company that does the printing will only accept Illustrator files. So the last thing I have to do in my art process is do one of two things;

- Open the SVG file in Illustrator
or
- Copy/Paste the art from Inkscape into Illustrator.

In both cases the layers I have are lost and I have to relayer the art. But worse, the artwork never comes out at the same size. The Inkscape art is always 25% larger when in Illustrator. An RCAF roundel that is created at .625inches in diameter in Inkscape ends up being .781inches when loaded or copied into Illustrator.

This causes all sorts of problems because I end up having to go back and recheck every single graphic to ensure that they're properly sized and is very prone to error (and errors are very expensive).

Is it just me finding this? Is it a known problem?

Beyond that, Inkscape has been a great tool. It's a far more intuitive software package than illustrator and has reduced the amount of time it takes me to create my decal art by many hours. I just wish I could more seamlessly port it to Illustrator (actually, it would be better if more professional printing companies accepted Inkscape SVG files so I didn't have to port it at all).

Thanks
David
http://www.wintervalley.com

Slow Dog
Posts: 180
Joined: Wed Sep 24, 2008 7:51 pm

Re: Different object sizes in Inkscape vs Illustrator?

Postby Slow Dog » Thu Jan 26, 2012 3:16 am

I'm going to guess it's because Inkscape assumes a resolution of 90 DPI, and Illustrator 72 DPI.

I know you can't change Inkscape's, and Googling suggests you can't change Illustrator's either. The differences supposedly come out in the wash when you export, but in your case the transition doesn't include an export.

I'd suggest setting the complete document (or some temporary background rectangle to the real objects) to a known size (in Inches, rather than Pixels) in Inkscape, then re-scaling that to the correct size once in Illustrator.

(You can probably tell I've never actually done this myself)

DavidWinter
Posts: 2
Joined: Wed Jan 25, 2012 12:58 am

Re: Different object sizes in Inkscape vs Illustrator?

Postby DavidWinter » Thu Jan 26, 2012 6:20 am

Hmm thanks... hadn't considered DPI. Guess I thought that the sizes of objects were stored in the SVG file. So .625inches is the same wherever you go. I guess SVG stores sizes as points that are variable based on DPI than someting more constant like inches or millimetres.

I'm not sure that is the actual reason but it sounds as good a theory as I've heard. Beyond manual labour, I'm not sure what can be done to correct that though if we can't change our default DPI to match that of illustrator.

thanks
David

billps
Posts: 1
Joined: Fri Mar 09, 2012 8:03 pm

Re: Different object sizes in Inkscape vs Illustrator?

Postby billps » Fri Mar 09, 2012 8:08 pm

Actually you can change the dpi in inkscape.

Click File > Inkscape Preferences > Import/Export > change the dpi in the box there. I just tried it, and seems to fix the problem when copying and pasting into Illustrator - the image pasted was the same size in illustrator as in inkscape.

mita77
Posts: 2
Joined: Thu May 19, 2016 6:21 pm

Re: Different object sizes in Inkscape vs Illustrator?

Postby mita77 » Thu May 19, 2016 10:35 pm

Hi to everyone,
I faced exactly the same problem. I got from a graphic company svg files exported from Adobe Illustrator (I do not know which version but it was on 16.5.2016). When I opened the file in Inkscape, everything was exactly about 20% smaller. After searching on web in forums etc. and a bit of play with html code I found the way how to fix that.
The problem comes from Adobe, as they expect everyone to use 72dpi to convert from px onto "real" dimensions in the graphic SW. But Inkscape is already on 90 dpi and that is when all the mess comes out. You may find some "easy" solutions which are wrong e.g.: change the dpi in Inkscape in settings/bitmaps/default import resolution (usually preset on 72 dpi). But this influences only bitmaps as it is called, therefore this solves nothing here. You can also find tips from Adobe to tick checkbox "Responsive". But this has something to do with scaling according to the used screens sizes (mobile, tablet etc.) and therefore again does not help with our issue.
The problem is deeper, where we can not prevent it right from Adobe Illustrator or in importing/opening at Inkscape. Root problem is that Ai expects everyone is still using 72 dpi when converting from px onto a "real" dimensions. But Inkscape (and some others) are already on 90dpi. But beacuse Adobe has not notice this change of the World around yet, they do not write down the size into the svg code, represented by "width and height" dimensions. See this link about it https://forums.adobe.com/thread/1397645 They have there the values, but they are in px and not pt as they still believe it is the same.

See this example to better understand: you make a graphic in Adobe Illustrator 254mm wide=10 inches. When saving that it converts that onto 720 px resolution (for them same as 720 pt). And that value will be in the svg code. But as they still think everyone has 72 dpi, they did not say how many pt wide it is. Therefore when you open that in Inkscape, which finds nothing about its width and height, it divides/converts those 720 by 90 which makes 8 inches. Upps, here we are, right 20% less. Catching the line? Beacuse I think all the Pro graphics working in Adobe will tell you its an Inkscape fault, which is a bulshit. They missed the train :-)
So how can we fix that? You can open the file, select all and scale that up about 25% "to get from 8 to 10 in our case". But that might be to late if there is something more complicated inside the file. I found an easy and elegant way to fix this. You just have to make a bit of Adobes work. Lets go ahead:
Here is the svg code after exporting from Ai:
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, 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" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Vrstva_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" HERE IS THE MISSING INFO ABOUT WIDTH AND HEIGHT viewBox="0 0 653.6 900.2"
style="enable-background:new 0 0 653.6 900.2;" xml:space="preserve">
<style type="text/css">
.st0{clip-path:url(#SVGID_2_);fill:#FFFFFF;}
.st1{fill:#232F5D;}
.st2{font-family:'Gotham-Bold';}
.st3{font-size:8px;}
.st4{font-family:'Gotham-Light';}
.st5{fill:#D70C38;}
.st6{clip-path:url(#SVGID_4_);fill:#D70C38;}
.st7{clip-path:url(#SVGID_4_);fill:#FFFFFF;}
.st8{clip-path:url(#SVGID_4_);fill:none;stroke:#D70C38;stroke-width:0.25;stroke-miterlimit:10;}
.st9{fill:none;stroke:#FFFFFF;stroke-width:1.25;stroke-miterlimit:10;}
.st10{fill:none;stroke:#000000;stroke-width:0.25;stroke-miterlimit:10;}
</style>
<switch>

And here is how it should look like, see in green what needs to be added:
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, 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" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Vrstva_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="653.6pt" height="900.2pt" viewBox="0 0 653.6 900.2"
style="enable-background:new 0 0 653.6 900.2;" xml:space="preserve">
<style type="text/css">
.st0{clip-path:url(#SVGID_2_);fill:#FFFFFF;}
.st1{fill:#232F5D;}
.st2{font-family:'Gotham-Bold';}
.st3{font-size:8px;}
.st4{font-family:'Gotham-Light';}
.st5{fill:#D70C38;}
.st6{clip-path:url(#SVGID_4_);fill:#D70C38;}
.st7{clip-path:url(#SVGID_4_);fill:#FFFFFF;}
.st8{clip-path:url(#SVGID_4_);fill:none;stroke:#D70C38;stroke-width:0.25;stroke-miterlimit:10;}
.st9{fill:none;stroke:#FFFFFF;stroke-width:1.25;stroke-miterlimit:10;}
.st10{fill:none;stroke:#000000;stroke-width:0.25;stroke-miterlimit:10;}
</style>
<switch>

It is quite easy, just write down the green text width="653.6pt" height="900.2pt into showed position. Values are exactly the same as highlited in orange and they are already there, just keep them. BUT YOU MUST USE THE pt UNITS, OTHERWISE IT DOES NOT WORK. With px units you will not change anything. Of course after rewriting the code save the file with a new name to secure the original data.

One more tip I found is to reduce the file size. The point is that Ai adds into the code behind the html part its own graphic data="mess". I read that when you get the svg file from Ai, edit that in Inkscape and save as svg the "mess" part still remains there. And when someone opens that svg file again i Ai, it simply ignores your changes, because it reads only its own "mess". See the link here: http://wiki.inkscape.org/wiki/index.php ... re_lost.21

So being already in editing svg html code directly in some Notepad, you can help yourself by reducing the file size and also force the Ai to read the html code which you made/edited. Their "messy" parts starts by this TAG: <i:pgf id="adobe_illustrator_pgf"> Simply delete from this TAG (including it) everything till the end. You reduce the file size dramaticaly. To be correct, this worked in a simple files (bussines cards, head papers, etc.) in more complicated ones I did not find the starting TAG, evethoung its end is at the end of the code).

I spent almost a day to find this all out, si I hope it helps to save time and nerves of anybody out there :-)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Different object sizes in Inkscape vs Illustrator?

Postby brynn » Fri May 20, 2016 1:45 am

Interesting! I can't comment on the details, since I don't have access to Illustrator, to test for myself. But I do have some questions.

I would have thought that ultimately the real size of the object shouldn't change. Like if it's 10 inches in Illustrator, it's 10 inches in Inkscape, even though the display might look different. If you print it, for example, or cut out of wood with your router, it should still end up 10 inches.

Would it be too much trouble for you to make a simpler example, for the code you posted? Like just a simple rectangle, so we don't have to wade through so much code, to try and understand.

Do you use a regular text editor to edit the code? Or could it be done in Inkscape's XML Editor?

mita77
Posts: 2
Joined: Thu May 19, 2016 6:21 pm

Re: Different object sizes in Inkscape vs Illustrator?

Postby mita77 » Fri May 20, 2016 7:34 pm

Hi brynn. Unfortunately we can not attach a file in here. But I will send you 2 files where you will see that difference straight away.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Different object sizes in Inkscape vs Illustrator?

Postby brynn » Sat May 21, 2016 10:39 am

Oh, I just meant paste in the code, like you did above.

I don't have Illustrator, so I wouldn't be able to test, even if you did send files. It's not that I don't believe you, you understand. We just like to verify info, that seems to be posted as a fact. You could be absolutely correct. We just like to verify.

(Also, note that this forum may be disappearing soon. If you find it missing, or overrun with spam, try posting on Inkscape Community's forum: http://forum.inkscapecommunity.com/index.php)

Maybe if someone who has Illustrator can answer, you could send them the files. Or maybe they could reply with their own knowledge.

Or....I'm not sure if you mean that you tried to attach files and you couldn't, or if the files just can't be shared publically. But if you post on the Help board, you will be able to attach files.


Return to “Discuss Software Issues”