export to PDF leaves white gaps between rects

Bug #168957 reported by Ckemmer
6
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

I created a svg file with Inkscape 0.45.1, built Mar 21 2007 on Win XP
(both German versions)

In Inkscape, everything is displayed fine. Also printing on my HP Laserjet
3390 or printing to a file works fine.

But opening the svg-file with Firefox 2.0.0.7 (German) or saving a copy in
PDF-Form and opening it with Acrobat Reader 8.1.0 (German) results in an
incorrect display of the small rectangles next to the grey rectangles
labeled "Treppe".

I am going to attach screenshots to show what I mean. Expected result was
that all the screenshots show the same situation which is obviously not the
fact.

Revision history for this message
Ckemmer (ckemmer) wrote :
Revision history for this message
Ckemmer (ckemmer) wrote :

Originator: YES

File Added: Entwurf1.inkscape.png

Revision history for this message
Ckemmer (ckemmer) wrote :

Originator: YES

May be a Firefox-problem, but saved into a PDF same problem.
File Added: Entwurf1.firefox.png

Revision history for this message
Ckemmer (ckemmer) wrote :

Originator: YES

Saved to a PDF, not displayed properly
File Added: Entwurf1.savecopy.zip

Revision history for this message
Ckemmer (ckemmer) wrote :

Originator: YES

File Added: Entwurf1.print.pdf

Revision history for this message
Ckemmer (ckemmer) wrote :

Originator: YES

So expected behaviour was that at least Entwurf1.savecopy.zip shows the
same as Entwurf1.print.pdf, Entwurf1.inkscape.png, or Entwurf1.svg.

Even better, if also Entwurf1.firefox.png showed that result.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Originator: NO

1 batik displays the file same as Inkscape, so it's a firefox problem
really

2 export to pdf indeed leaves gaps, will investigate that

Revision history for this message
Bug Importer (bug-importer) wrote :

> 2 export to pdf indeed leaves gaps, will investigate that

Other output formats written on top of the print extension have the same
problem (ps, emf, etc.). Looks like the (almost) zero size rectangels are
the cause. Here is one of the rectangles extracted from the example, and
also a copy of the rectangle modified to have a body so you can see the
difference.

/Ulf

---
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   width="744.09448"
   height="1052.3622">
  <rect
     width="1.0212575e-006"
     height="88.582672"
     x="-597.93311"
     y="294.98029"
     transform="scale(-1,1)"

style="fill:#ffffff;fill-opacity:1;stroke:#b30000;stroke-width:8.85826874;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     id="rect8392" />
  <rect
     width="1"
     height="88.582672"
     x="-557.93311"
     y="294.98029"
     transform="scale(-1,1)"

style="fill:#ffffff;fill-opacity:1;stroke:#00b300;stroke-width:8.85826874;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
/>
</svg>
---

Revision history for this message
Bug Importer (bug-importer) wrote :

The same can actually be seen on screen in Inkscape and in the exported
png files. It depends on your zoom factor and how small the parameters are.
Here is an extreme example:

----

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   width="700"
   height="100">
  <rect
     width="10"
     height="80"
     x="50"
     y="10"
     style="stroke:#00b300;stroke-width:10" />
  <rect
     width="1"
     height="80"
     x="100"
     y="10"
     style="stroke:#00b300;stroke-width:10" />
  <rect
     width="1e-1"
     height="80"
     x="150"
     y="10"
     style="stroke:#00b300;stroke-width:10" />
  <rect
     width="1e-2"
     height="80"
     x="200"
     y="10"
     style="stroke:#00b300;stroke-width:10" />
  <rect
     width="1e-3"
     height="80"
     x="250"
     y="10"
     style="stroke:#00b300;stroke-width:10" />
  <rect
     width="1e-4"
     height="80"
     x="300"
     y="10"
     style="stroke:#00b300;stroke-width:10" />
  <rect
     width="1e-5"
     height="80"
     x="350"
     y="10"
     style="stroke:#00b300;stroke-width:10" />
  <rect
     width="1e-6"
     height="80"
     x="400"
     y="10"
     style="stroke:#b30000;stroke-width:10" />
  <rect
     width="1e-7"
     height="80"
     x="450"
     y="10"
     style="stroke:#b30000;stroke-width:10" />
  <rect
     width="1e-8"
     height="80"
     x="500"
     y="10"
     style="stroke:#b30000;stroke-width:10" />
  <rect
     width="1e-9"
     height="80"
     x="550"
     y="10"
     style="stroke:#b30000;stroke-width:10" />
  <rect
     width="1e-10"
     height="80"
     x="600"
     y="10"
     style="stroke:#b30000;stroke-width:10" />
  <rect
     width="0"
     height="80"
     x="650"
     y="10"
     style="stroke:#b30000;stroke-width:10" />
  <path
     style="stroke:#000000;stroke-width:1px;fill:none"
     d="M 50,5 L 650,5 L 650,95 L 50,95 z" />
</svg>

Revision history for this message
vonHalenbach (lustik) wrote :

I can still confirm it with SVN 16763. I exported the attached svg to cairo pdf. But i seem to have an old version of cairo installed. My cairo is 1.4.2 i don't know if this is relevant.

Changed in inkscape:
assignee: nobody → buliabyak
importance: Undecided → Medium
milestone: none → 0.46
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

I'm dropping the milestone on this bug because it doesn't really seem like it would be a release blocker.

Changed in inkscape:
milestone: 0.46 → none
Revision history for this message
Tom Davidson (tjd-mit) wrote :

Possibly a dupe/related to bug 168275?

Revision history for this message
Ckemmer (ckemmer) wrote :

I think it is related to bug 168275, not exactly a duplicate.

tags: added: pdf
removed: saving
su_v (suv-lp)
tags: added: cairo exporting
Revision history for this message
Johan Engelen (johanengelen) wrote :

when converting the "Zero" height rectangle stroke-to-path, the result is also wrong.

Revision history for this message
Johan Engelen (johanengelen) wrote :

this is tested in the testsuite: testcases\basic\rects with zero area.svg

Revision history for this message
jazzynico (jazzynico) wrote :

Also affects the trunk versions of Inkscape (with cairo rendering). Reproduced on XP with revision 11859 (cairo 1.11.2) and 11871 (cairo 1.12.8, local test).

Changed in inkscape:
assignee: bbyak (buliabyak) → nobody
status: Confirmed → Triaged
Revision history for this message
Beluga (buovjaga) wrote :

I see the gaps in Inkscape with any zoom level. Not sure what to think of this.

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92pre1 15073 (GTK3)

Revision history for this message
jazzynico (jazzynico) wrote :

Tested again on Windows XP (32-bit) with recent Inkscape versions:
- with 0.48.5, looks good on Inkscape but exported with gaps,
- with 0.91, looks good on Inkscape when opening (or with a zoom of 100%) but shows gaps with any other zoom value and exported with gaps,
- with 0.92.x rev. 15044, gaps in Inkscape (any zoom level) and in the PDF export.

Surprisingly, Firefox 48 acts exactly as Inkscape 0.91 (no gap when opening the file or with a zoom level of 100%, gaps when zooming in or out).

So I wonder if it's a bug in Inkscape or in the SVG file.

Nathan Lee (nathan.lee)
tags: added: bug-migration
Revision history for this message
Nathan Lee (nathan.lee) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/-/issues/3899
Closed by: https://gitlab.com/nathanal

Changed in inkscape:
status: Triaged → Invalid
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.