
Hi, I'm running cvs version of Inkscape 0.43 and I'm having trouble wtih the paper size. When I create a new document I usually use A4 paper size. My default units are mm, and according to the Document properties an A4 sheet of paper is 248,03 x 350,79 mm. This is incorrect, should be 210 x 279 mm. When I accept this setting and return to the main window I create a vertical guideline at 0mm, which goes correctly to the left edge, and another guideline at 210mm, which goes correctly to the right edge. Strange... On the other hand horizontal guidelines go wrong; a hor. guide at 0 mm goes correctly to the bottom edge, but a guide at 279mm goes way below the top edge.
Another curious thing is that, although it uses 248,03 x 350,79 mm as the size in mm for A4 when I change the units to cm, it sets the page size to 21,26 x 30,07 cm. It didn't convert correctly.
How to reproduce this: - Open a new document. - Open "Document Properties" (Shift+Ctrl+D) - Set page size to A4 - Set units to mm (note the width and height) - Set units to cm (note the width and height)
If this is a know "feature" I'll wait for it's solution, otherwise I'll be happy to file a bug.
OK, I just checked the bug list on sourceforge and I guess this is just a confirmation of bug: [ 1391348 ] Win32: 0.43 devel+: wrong page sizes http://sourceforge.net/tracker/index.php?func=detail&aid=1391348&gro... I'm using Ubuntu Breezy, so I can confirm that.
Cheers.

on ubuntu breezy (a little bit dappered) I confirm this with both 0.43 breezy release and current cvs from 4 hours ago.
Lucas Vieites a écrit :
Hi, I'm running cvs version of Inkscape 0.43 and I'm having trouble wtih the paper size. When I create a new document I usually use A4 paper size. My default units are mm, and according to the Document properties an A4 sheet of paper is 248,03 x 350,79 mm. This is incorrect, should be 210 x 279 mm. When I accept this setting and return to the main window I create a vertical guideline at 0mm, which goes correctly to the left edge, and another guideline at 210mm, which goes correctly to the right edge. Strange... On the other hand horizontal guidelines go wrong; a hor. guide at 0 mm goes correctly to the bottom edge, but a guide at 279mm goes way below the top edge.
Another curious thing is that, although it uses 248,03 x 350,79 mm as the size in mm for A4 when I change the units to cm, it sets the page size to 21,26 x 30,07 cm. It didn't convert correctly.
How to reproduce this:
- Open a new document.
- Open "Document Properties" (Shift+Ctrl+D)
- Set page size to A4
- Set units to mm (note the width and height)
- Set units to cm (note the width and height)
If this is a know "feature" I'll wait for it's solution, otherwise I'll be happy to file a bug.
OK, I just checked the bug list on sourceforge and I guess this is just a confirmation of bug: [ 1391348 ] Win32: 0.43 devel+: wrong page sizes http://sourceforge.net/tracker/index.php?func=detail&aid=1391348&gro... I'm using Ubuntu Breezy, so I can confirm that.
Cheers.

How to reproduce this:
- Open a new document.
- Open "Document Properties" (Shift+Ctrl+D)
- Set page size to A4
- Set units to mm (note the width and height)
- Set units to cm (note the width and height)
If this is a know "feature" I'll wait for it's solution, otherwise I'll be happy to file a bug.
It is known but I still can't reproduce it. What date is the source?
ralf

On 1/5/06, Lucas Vieites <lucas@...212...> wrote:
When I create a new document I usually use A4 paper size. My default units are mm, and according to the Document properties an A4 sheet of paper is 248,03 x 350,79 mm. This is incorrect, should be 210 x 279 mm.
Cannot reproduce that, it's correct for me.
Can you check if your share/ui/units.xml file is OK?
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org

I wandered through the code and finally found what was broken with these page dimensions.
The units (and their factor to pixels) are read from share/ui/units.txt (and not the xml file as bulia stated, it's commented out as "buggy").
This file contains a double floating value which is read through sscanf, but sscanf is bound to the locale settings. So here, in France, my locale is FR_fr, and the separator in floats is a comma ',', not a dot '.'
So sscanf returned only the 3 out of 3.543307 ! That explains why some people had really strange results on non-dot-floats-locales and why most us-localised devs didn't see anything wrong.
So I saved the locate, forced the locale to be set to 'C' before reading the file, and set the "old" one after parsing the units (as found here : http://mail.gnome.org/archives/gnome-devel-list/2000-September/msg00340.html)
On the other hand, if someone objects with temp locale changing, we could code a function returning a double from a C-localised string representing a float (there should be something in std)
I'm about to commit my changes, but since it will be my first commit, I'll wait for a more experienced dev to second me, just to be sure (I'm on jabber conference)
Once commited, bug report #1391348 should be closed.
And we should check if other sscanf are done somewhere in order to avoid this kind of problems.
mtou
Lucas Vieites a écrit :
Hi, I'm running cvs version of Inkscape 0.43 and I'm having trouble wtih the paper size. When I create a new document I usually use A4 paper size. My default units are mm, and according to the Document properties an A4 sheet of paper is 248,03 x 350,79 mm. This is incorrect, should be 210 x 279 mm. When I accept this setting and return to the main window I create a vertical guideline at 0mm, which goes correctly to the left edge, and another guideline at 210mm, which goes correctly to the right edge. Strange... On the other hand horizontal guidelines go wrong; a hor. guide at 0 mm goes correctly to the bottom edge, but a guide at 279mm goes way below the top edge.
Another curious thing is that, although it uses 248,03 x 350,79 mm as the size in mm for A4 when I change the units to cm, it sets the page size to 21,26 x 30,07 cm. It didn't convert correctly.
How to reproduce this:
- Open a new document.
- Open "Document Properties" (Shift+Ctrl+D)
- Set page size to A4
- Set units to mm (note the width and height)
- Set units to cm (note the width and height)
If this is a know "feature" I'll wait for it's solution, otherwise I'll be happy to file a bug.
OK, I just checked the bug list on sourceforge and I guess this is just a confirmation of bug: [ 1391348 ] Win32: 0.43 devel+: wrong page sizes http://sourceforge.net/tracker/index.php?func=detail&aid=1391348&gro... I'm using Ubuntu Breezy, so I can confirm that.
Cheers.

On 1/6/06, Mathieu Dimanche <mdimanche@...8...> wrote:
I wandered through the code and finally found what was broken with these page dimensions.
The units (and their factor to pixels) are read from share/ui/units.txt (and not the xml file as bulia stated, it's commented out as "buggy").
This file contains a double floating value which is read through sscanf, but sscanf is bound to the locale settings. So here, in France, my locale is FR_fr, and the separator in floats is a comma ',', not a dot '.'
Thanks for tracking this down! I think you can commit your fix, it seems safe to me.
I think it was Bryce who wrote this originally. Bryce, can you please remove the units.xml code and the file itself, so it does not confuse people anymore? Or, switch to *.xml (what exactly is "buggy" in it) and remove the *.txt? Note that for XML, we have well-tested locale-independent read/write routines, so this problem would likely never have bitten us with XML.
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org

I finally committed the changes and it seams to work. us-*localised people won't see anything, but others may find the document sizing working a lot better :)
it's a pain there's so much difference between europe and us dev's bedtime :)
mtou
Mathieu Dimanche a écrit :
I wandered through the code and finally found what was broken with these page dimensions.
The units (and their factor to pixels) are read from share/ui/units.txt (and not the xml file as bulia stated, it's commented out as "buggy").
This file contains a double floating value which is read through sscanf, but sscanf is bound to the locale settings. So here, in France, my locale is FR_fr, and the separator in floats is a comma ',', not a dot '.'
So sscanf returned only the 3 out of 3.543307 ! That explains why some people had really strange results on non-dot-floats-locales and why most us-localised devs didn't see anything wrong.
So I saved the locate, forced the locale to be set to 'C' before reading the file, and set the "old" one after parsing the units (as found here : http://mail.gnome.org/archives/gnome-devel-list/2000-September/msg00340.html)
On the other hand, if someone objects with temp locale changing, we could code a function returning a double from a C-localised string representing a float (there should be something in std)
I'm about to commit my changes, but since it will be my first commit, I'll wait for a more experienced dev to second me, just to be sure (I'm on jabber conference)
Once commited, bug report #1391348 should be closed.
And we should check if other sscanf are done somewhere in order to avoid this kind of problems.
mtou
Lucas Vieites a écrit :
Hi, I'm running cvs version of Inkscape 0.43 and I'm having trouble wtih the paper size. When I create a new document I usually use A4 paper size. My default units are mm, and according to the Document properties an A4 sheet of paper is 248,03 x 350,79 mm. This is incorrect, should be 210 x 279 mm. When I accept this setting and return to the main window I create a vertical guideline at 0mm, which goes correctly to the left edge, and another guideline at 210mm, which goes correctly to the right edge. Strange... On the other hand horizontal guidelines go wrong; a hor. guide at 0 mm goes correctly to the bottom edge, but a guide at 279mm goes way below the top edge.
Another curious thing is that, although it uses 248,03 x 350,79 mm as the size in mm for A4 when I change the units to cm, it sets the page size to 21,26 x 30,07 cm. It didn't convert correctly.
How to reproduce this:
- Open a new document.
- Open "Document Properties" (Shift+Ctrl+D)
- Set page size to A4
- Set units to mm (note the width and height)
- Set units to cm (note the width and height)
If this is a know "feature" I'll wait for it's solution, otherwise I'll be happy to file a bug.
OK, I just checked the bug list on sourceforge and I guess this is just a confirmation of bug: [ 1391348 ] Win32: 0.43 devel+: wrong page sizes http://sourceforge.net/tracker/index.php?func=detail&aid=1391348&gro...
I'm using Ubuntu Breezy, so I can confirm that.
Cheers.
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id%16865&op=click _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (4)
-
bulia byak
-
Lucas Vieites
-
Mathieu Dimanche
-
Ralf Stephan