Comment 20 for bug 1405292

Revision history for this message
David Mathog (mathog) wrote :

If the sample file is opened it and "Document properties" checked it says 273.33334 x 273.33334 pixels. Save to EMF and reopen and that document size is 73 x 73 mm. Are they the same? No, change units on the first one from px to mm and it says 72.31945 mm.

The EMF export functions contain code to round off certain numbers so that the file can be imported and exported with complete numerical stability _of the contents_ and the _drawing size_. To achieve that the original document size may need to be tweaked slightly, because EMF uses integer sized documents (like 28000 x 13000, or whatever). It does not, and cannot, guarantee that the document size is exactly the same as it was in SVG. Often it does manage that, if the numbers come out right. Here they do not.

If you copy the contents of the re-opened EMF file into the PDF one, and align on the left edge, you can see that the right edge lines up exactly. So the drawings contents have not been resized.

Note also that the PDF import makes the outer edge somewhat ragged, which may be in part what you are seeing. When I view the sample in PDF-Xchange viewer the white street intersecting the edge of the drawing near the final "n" in Kopmansgatan is flush with the drawing's edge. When the PDF is imported into Inkscape it is not, it protrudes outward slightly at high magnification. That suggests either a rounding error or some issue with clipping. Can you produce a simpler PDF sample that still has the edge problem? (A simple solid rectangle would be best, if that's possible.)

The dashed line is a separate issue. It looks fuzzy in the final EMF. Zoom in on it and it can be seen that it is still dashed, but the dash length relative to the width is much shorter. This is undoubtedly yet another issue related to the "units" work, here triggered by the change from px to mm. I can reproduce that and will file a new bug on it.