SVG size on opening

Asked by Bonnie M Bobbitt on 2018-10-31

How can I ensure that an svg image opens at the correct size. I have a series of svg files that I know are of a certain size. Only when I open them in Inkscape they do not open at the correct size.

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
2018-11-02
Last reply:
2018-11-02
Hachmann (marenhachmann) said : #1

Can you share a link to an example file, let us know your Inkscape version, and tell us what file dimensions you would have expected? Also, I'd be interested to learn about the source of the SVG file, and how you know its dimensions.

Bonnie M Bobbitt (bmb) said : #2

I'm teaching an machine embroidery class called Stained Glass Quilt. The quilt blocks consist of fabric pieces cut on cutters such as the Brother Scan n Cut. The SVG files are used as cut files and are provided by the design company in specific sizes to fit specific size embroidery hoops.

I use an embroidery software called Floriani Total Control Universe which is an object (vector) based software. In the software, I can import the SVG files for the quilt and print them off. Not every student who enrolls in this class will have FTCU to print out the SVG files. So I thought that they might download and use Inkscape. It is very important though that the SVG files printed are the size required for the quilt.

I have version 1.1 Second Edition. I don't think I can link to anything. I could attach a file if I knew how.

Thanks, Bonnie

Bonnie M Bobbitt (bmb) said : #3

If my reading is correct, I have version 0.48.

Hachmann (marenhachmann) said : #4

Hi Bonnie,

so do I understand correctly:

- you have version 0.48 (Help > About), probably 0.48.5?
- your students are using 0.92.3, probably?
- you open a file with your program, and print it out on a normal printer, and get the right size
- your students open the file with Inkscape, and print it out on a normal printer, and get a different, wrong, size

?

If this is what you mean, I will need the file, and the expected print size, and the real print size of one of the objects in it (if possible, in mm). There has been a unit change from Inkscape 0.91 to 0.92 (0.48 is really ancient), and this unit change might affect how the files are handled now.

For sharing an SVG file, you can use any of the famous file hosting services - google drive, ms one drive, ... etc. Or if you don't have an account at any of these, you can use the anonymous framadrop.org.

Then post a link to the file in your reply.

Also, if you can, please indicate the source of the SVG files you are using. Which software created them?

Bonnie M Bobbitt (bmb) said : #5

Hachmann,

You are correct about my version - .48. However, it's not the students who are using Inkscape - I am. My goal is to have the students who don't have FTCU use Inkscape. I've provided a link to one of the svg files used in the quilt. When I import the svg file into FTCU its size is 151.9 mm W x 155.9mm H and it prints off at that size. When I open the file in Inkscape, the size is 121.769mm W x 121.215mm H and it prints off at that size.

I have no idea what program was used to create the svg file. The company that created the quilt svgs is Anita Goodesign out of North Carolina.

Here is the link to the svg file I've referenced.

https://1drv.ms/u/s!AraNRCPvYtsNcCGmpBz49h6czEM

Thanks for your attention.

Bonnie

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Hachmann
Sent: Thursday, November 1, 2018 5:27 PM
To: <email address hidden>
Subject: Re: [Question #675821]: SVG size on opening

Your question #675821 on Inkscape changed:
https://answers.launchpad.net/inkscape/+question/675821

Hachmann posted a new comment:
Hi Bonnie,

so do I understand correctly:

- you have version 0.48 (Help > About), probably 0.48.5?
- your students are using 0.92.3, probably?
- you open a file with your program, and print it out on a normal printer, and get the right size
- your students open the file with Inkscape, and print it out on a normal printer, and get a different, wrong, size

?

If this is what you mean, I will need the file, and the expected print
size, and the real print size of one of the objects in it (if possible,
in mm). There has been a unit change from Inkscape 0.91 to 0.92 (0.48 is
really ancient), and this unit change might affect how the files are
handled now.

For sharing an SVG file, you can use any of the famous file hosting
services - google drive, ms one drive, ... etc. Or if you don't have an
account at any of these, you can use the anonymous framadrop.org.

Then post a link to the file in your reply.

Also, if you can, please indicate the source of the SVG files you are
using. Which software created them?

--
You received this question notification because you asked the question.

Hachmann (marenhachmann) said : #6

Okay. Thank you.

So, the reason is this:

-Adobe Illustrator (which created the SVG file, it's in the code) used a different unit than Inkscape for defining the SVG - it uses pt (72 dpi), and Inkscape 0.48 uses px (90 dpi). Inkscape 0.92 uses px, too, for this file, but at 96 dpi, so for your students, who will install a newer Inkscape version, the printout will be even smaller.

Unfortunately, Illustrator didn't bother to indicate the unit (correctly), so basically, the SVG file's unit system is undetermined, and can be interpreted as the viewer wants to.

- To fix this, you can do either of these three things to a file:

1. Fix the document, using Inkscape:
- open with Inkscape 0.92.3 (yes, you need that version to be able to do this)
- open File > Document properties
- in the top right corner, set display unit to 'pt'
- then, in the 'Scale x' field, set the scale to 1 (from 1.333333)
- you may need to move the object so it's back inside the page area
- save file

2. Just rescale (but this will require different calculations for Inkscape < 0.92 and >= 0.92):

- select object(s)
- click on lock icon in the tool controls for selector tool
- after the current value for width (or height) add this into the field:
   /72*90 (for Inkscape 0.48) or
   /72*96 (for Inkscape 0.92 and higher)
- hit Enter
- move object onto page
- save file

3. Use a text editor:

You can also edit the SVG (text) file directly to fix it quickly (instructions assume that all files are letter format, and that all of them are structured in the same way):

- open the file in a plain text editor (e.g. Notepad)
- look for the '<svg' opening tag
- paste
 width="8.5in" height="11in"
after <svg
(keep the space before and after)
- save
- file should now work in both 0.48 and 0.92.3 (but cannot test, I don't have 0.48 installed anymore)

I strongly suggest you update (uninstall, install new version), if there isn't a vital reason to not do so. Inkscape 0.92.3 is different in many ways from 0.48, and it will cause you to not be able to help your students with some problems if you have different versions.

Can you help with this problem?

Provide an answer of your own, or ask Bonnie M Bobbitt for more information if necessary.

To post a message you must log in.