PDF export - size of PDF slightly wrong [0.91]

Bug #1637055 reported by zouiip
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

Hi everyone,

I experience an issue while exporting in PDF : the size of my bitmaps is slightly off, creating a white row or column in my figures. This effect seems similar to the bug #168275 already reported few years ago.

I am using Inkscape 0.91 r13725 under Ubuntu 16.04. Attached is an example consisting of a SVG file and the resulting PDF file. In the SVG file, each black rectangle is composed of a black bitmap and an independent black contour. The bitmap has been created with the python library "matplotlib", exported as pdf and finally imported in Inkscape using poppler. In Inkscape, the rectangle is entirely black. When exported into PDF, a white line appears (horizontal in the top of bitmap 1, vertical on the left of bitmap 3), as a result of the smaller size of the bitmap.

My understanding is that the size of the bitmap is rounded while exporting in PDF, as suggested earlier and thought fixed in comment #14 of bug #168275. Each bitmap before export is L = 86,768 pt and H= 100,651 pt. After the export, bitmap 1 is L=86,768 pt and H= 100,000 pt whereas bitmap 3 is L=86,000 pt and H= 100,651 pt.

Thanks !

Tags: exporting pdf
Revision history for this message
zouiip (zouiip) wrote :
Revision history for this message
zouiip (zouiip) wrote :
su_v (suv-lp)
tags: added: exporting pdf
Revision history for this message
Alvin Penner (apenner) wrote :

confirmed on Windows 10, Inkscape 0.92pre2 15127 (Oct 21 2016)

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

@zouiip - I have been able to confirm the svg dimensions of the image, namely L = 86,768 pt and H= 100,651 pt. This comes from 50x58 image size multiplied by 2.1692088 which is in the 'use' transform, multiplied by 72/90 which converts from px to pt.
However I do not know where the numbers in the final comment come from:

"After the export, bitmap 1 is L=86,768 pt and H= 100,000 pt whereas bitmap 3 is L=86,000 pt and H= 100,651 pt."

Could you indicate how you got these numbers, or which program you used?

Revision history for this message
zouiip (zouiip) wrote :

Hi Alvin,

After producing "test.pdf", I reopened the PDF file with Inkscape (using poppler to import the file) and checked the size.

Revision history for this message
Alvin Penner (apenner) wrote :

okay, I get it. I have been using the internal import, not the Poppler, to reload the pdf file. When I do, I see that there is a problem with the clip paths. The size of the clip paths is given below

image 1, clip path 20
m 79.043,211.914 h 86.77 v -100 h -86.77 z

image 3, clip path 80
m 135,100.902 h 86 V 0.25 h -86 z

In both cases the width or the height has been rounded off to be an integer, either 100 for height or 86 for width. If I delete the appropriate clip path in the XML editor, the problem is solved. However, we still need to identify what is wrong in the pdf file that could cause this.

Revision history for this message
zouiip (zouiip) wrote :

Your workaround worked, I removed the clip path : thanks Alvin!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.