Huge color "blobs" in PDF export and print

Bug #248721 reported by Lionel Dricot
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
theAdib
cups (Ubuntu)
Invalid
Undecided
Unassigned
inkscape (Debian)
Fix Released
Unknown
inkscape (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

1) Open the following schema with inkscape 0.46 (Ubuntu 8.04). See that all seems to be correct.

2) Print or export the PDF : huge red circles appear and color blobs replace the text on arrows.

Note that the file was created from scratch using Inkscape 0.46.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :
Revision history for this message
Pablo Trabajos (pajarico) wrote :

I tried the SVG and it seems fine. For some reason the PDF you exported has been converted to a bitmap. This is completely normal for some effects, the strange thing is that the whole page was converted to a bitmap. My opinion is that this is (or better said, was) a bug or limitation on cairo based on my own similar problems.

I have just created a PDF from the SVG file and here is the result (see attachment). Notice how the blur effects are lost in the PDF (this is normal). I tried to export that as a bitmap but it didn't seem to work.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

So, you mean that it is already correct in the SVN or the next version ?

Revision history for this message
Pablo Trabajos (pajarico) wrote :

Yes. See my attached file.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Just to be sure : my pdf was obtained by printing to a virtual PDF printer. The export to PDF works correctly.

Revision history for this message
Pablo Trabajos (pajarico) wrote :

Ahhhh! You should have clarified that in the first place. A virtual printer is something alien to Inkscape. Is the virtual printer driver doesn't work as expected we can't do anything about it.
It's always better to save as a PDF instead of using a virtual printer (I guess you're using cups-pdf, which converts to PostScrit and then to PDF, this conversion grants ugly results most of the times).

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Yep, sorry, I'm reporting the bug for someone else and he was not clear about that point.

But I think that it is still a valid Inkscape bug because you hit it by simply printing a document from Inkscape. The workaround is simple : export as PDF then print the PDF. But straight printing is ugly. I don't know how to solve that but it's rather annoying. Maybe reporting this bug against gnome-print or whatever ?

Revision history for this message
Pablo Trabajos (pajarico) wrote :

Is not a Inkscape bug because is not on Inkscape code. To me is like saying that inkscape has a bug because your printer is not working. Inkscape does work in this case (proof of this is that you were able to export it as a PDF without problem).

When you send it to print it will be sent to the printing subsystem which means the data is passed to CUPS or whatever software your friend has installed. You should ask him what exactly is he using, because if he is using cups-pdf to print to PDF this has several limitations and the resulting PDF is of lower quality than PDF produced form Inkscape. cups-pdf creates a PS and then converts it to PDF. This is bad in many ways because PS has many limitations and can't represent many of the features a PDF or SVG can, and the software which converts PS->PDF is tricky and many times it screws the original file (I've been through this several times myself).

So, bottom line: unless inkscape is doing something nasty to the data sent to the printer subsystem (which I doubt) is not a bug in inkscape. Can you try if the printing preview in the printing dialog is correct? If it is, the problem is in CUPS, cups-pdf or whatever your friend is using.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

The print preview is *not* correct and display exactly what will be printed (the "blob" PDF)

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

This is still an issue in 8.10. Is anybody able to reproduce this bug in the print preview ?

Changed in inkscape:
status: New → Invalid
status: Invalid → New
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Also an issue in Jaunty alpha 5

Revision history for this message
Austin Lund (austin-lund) wrote :

Yes. I can confirm the bug in 8.10 when using print preview. Inkscape 0.46, built Oct 24 2008.

Revision history for this message
Thomas B (tbrownback) wrote :

Confirming here as well in 8.10 using print preview, Inkscape 0.46.

Things I noticed that may or may not be relevant:
1) When I open the svg in Image Viewer, it is mostly transparent with a lot of black blotches obscuring the boxes. The pdf looks fine, looks like the svg as seen from within Inkscape (no blotches). Was that intended? Is this unique on my machine?
2) There are four strange red circles on the print preview. Of these:
a) two of them seem to be filled in versions of the "red circle with speaker" graphic from the main image.
b) the other two are connected to the above, as if shadows. If you move the speaker icons, these "shadows" move a proportional distance on the page.

The other shapes seem to correspond to nearby text objects of that color.

Revision history for this message
Thomas B (tbrownback) wrote :

Attached, a stripped down version of the image file which might illustrate whatever the bug is more cleanly.

In Inkscape, I see a blank canvas with one layer.

In Print Preview, I see a single red circle in the middle of the page.

In Image Viewer, I see a blank canvas with transparency, no circle.

In the Print Preview from Image Viewer, I see a blank white page, no circle.

Looks like an Inkscape bug to me. Why is Inkscape showing something to the printer that it's not showing to the user, and that Image Viewer cannot see at all?

Revision history for this message
Thomas B (tbrownback) wrote :

Attached, a stripped down version of the image file which might illustrate whatever the bug is more cleanly.

In Inkscape, I see a blank canvas with one layer.

In Print Preview, I see a single red circle in the middle of the page.

In Image Viewer, I see a blank canvas with transparency, no circle.

In the Print Preview from Image Viewer, I see a blank white page, no circle.

Looks like an Inkscape bug to me. Why is Inkscape showing something to the printer that it's not showing to the user, and that Image Viewer cannot see at all?

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Closing CUPS task, as the problem also occurs when exporting to PDF and in the print preview.

Changed in cups (Ubuntu):
status: New → Invalid
Thomas B (tbrownback)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
Thomas B (tbrownback) wrote :

https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/247136 inspired me to look at tags inside the svg, and explains why the original svg is filled with black boxes for me.

At the end of the "simple red circle" file I posted, when opened in a text editor, you can see a tag marked <g></g>. This tag has two "path" tags inside it.

If you delete the contents of the second path tag, which contains the line 'style="fill:#ff0000"', you'll notice that the red circle in print preview (from within Inkscape) no longer appears.

Deleting the first of these two path sections from the file, or deleting other parts of the file, and the phantom red circle remains in print preview.

In the original file there are probably many more rogue "path" sections that slipped into the document during creation.

Revision history for this message
Bryce Harrington (bryce) wrote :

A pre-release of the upcoming Inkscape 0.47 is now available in Ubuntu
Karmic for testing. Because *so* much stuff has changed compared with
the version you reported your bug against, would you mind re-testing
this new version and see if this bug is now resolved?

Karmic Alpha CD ISO images are available at:

  http://cdimage.ubuntu.com/releases/karmic/

If you're not testing Karmic yet, there are .debs of this new Inkscape
for Jaunty, Hardy, and Intrepid here:

  https://launchpad.net/~inkscape.testers/+archive/ppa

You might find further bugs when testing this alpha release. If that is
the case, please file a NEW bug report here:

   https://edge.launchpad.net/inkscape/+filebug

Thanks ahead of time for your testing efforts, and enjoy the new Inkscape!

Changed in inkscape (Ubuntu):
status: Confirmed → New
status: New → Incomplete
tags: added: printing
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Bug still present in karmic as described

$ apt-cache policy inkscape
inkscape:
  Installed: 0.47~pre1-0ubuntu2
  Candidate: 0.47~pre1-0ubuntu2
  Version table:
 *** 0.47~pre1-0ubuntu2 0
        500 http://gb.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

$ uname -a
Linux een-pc222 2.6.31-10-generic #34-Ubuntu SMP Wed Sep 16 00:23:19 UTC 2009 i686 GNU/Linux

Changed in inkscape (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Screenshot attached showing difference between inkscape rendering and print preview

Revision history for this message
theAdib (theadib) wrote :

as I dig into the problem I found that even the attached simple stripped down version from the first sample shows the artefacts.
Adib.

tags: added: exporting pdf
Revision history for this message
su_v (suv-lp) wrote :

remove the stroke from the text and it exports to PDF without "blob". Don't know why though…

Revision history for this message
theAdib (theadib) wrote :

it is related to the miter values from the stroke dialog. But I have no idea how is that related.

Revision history for this message
theAdib (theadib) wrote :

its not the mitter its the calculatet stroke width. Change to 0.1px you will not see the stroke on the inkscape gui but there is a decent stroke around in the pdf output. tip: change stroke opacity to look trough and see the fill. the Adib.

Revision history for this message
su_v (suv-lp) wrote :

confirmed, but only when 'text on path'… and independent of the stroke units (px, pt, mm) used.

Revision history for this message
theAdib (theadib) wrote :

my latest investigation results:
when using "text on path" it: file(src/libnrtype/Layout-TNG-Output.cpp:Layout::showGlyphs()
-build the glyph path
-transform the surface to position and size the glyph
-draw glyphs
but otherwise
-build the glyph path
-transform the glyph path using given size and offset
-draw glyphs

In the first version the stroke-width on the stretched surface becomes (over)stretched to.
we need to reorder the steps and instead transform the surface matrix position the glyph path correctly.

Any volunteers to jump in?

Adib.

Revision history for this message
theAdib (theadib) wrote :

attached patch should solves this issue. It applies the transformation not to the surface but to the glyphs.
Pls test and confirm that it is working or not.
Adib.

Revision history for this message
theAdib (theadib) wrote :

My stripped down sample looks like this. see attachment. Adib.

Changed in inkscape:
status: Confirmed → In Progress
assignee: nobody → theAdib (theadib)
theAdib (theadib)
Changed in inkscape:
importance: Undecided → High
Revision history for this message
su_v (suv-lp) wrote :

Patch tested and confirmed with Inkscape 0.46+devel r22293 custom on OS X 10.5.8 :

stroked text put on path is exported to PDF without blobs. Great - many thanks to the Adib!

Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
ScislaC (scislac) wrote :

Patch committed in 22294. Thanks Adib!

Changed in inkscape:
status: In Progress → Fix Released
Revision history for this message
theAdib (theadib) wrote :

while the pdf does not look like the original I attach an other interim patch in addition to my previous one.

The svg:symbol elements are threated as group but should invoke the symbol_render function. The patch reorders the tests so that symbol is evaluated before group.

Still to come: the nice symbol in the red dot. The reasson here is that the outer group style:fill-rule:evenodd is not inherited to the next inner group.

As usual pls test this patch.

Revision history for this message
theAdib (theadib) wrote :

uups I did not see that this one was release already :-)
pls followup this one https://bugs.launchpad.net/inkscape/+bug/436962 for the remaining issues
Adib.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Still present in Inkscape 0.47~pre4-0ubuntu1 on karmic beta

Revision history for this message
su_v (suv-lp) wrote :

@Alexis - with "Still present" do you mean
a) you still get the 'blobs' in PDF export, or
b) the missing symbol in the red circle (moved to separate bug #436962)

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

0.47~pre4-0ubuntu1

It's a lot better than commentc #2 but there are still some red circles. See the attached PDF

Revision history for this message
su_v (suv-lp) wrote :

@Lionel - thank you for reporting back. Yes, the issue with the symbols and the red circles is still unresolved - theAdib opened a separate bug for it (bug #436962). Stroked text-on-path however is now exported correctly (since rev. 22294).

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

@~suv - apologies, I lost track of the bug status. I still experience the following problems:

a) There are two red circles, instead of four in the print preview (the other unwanted shapes have now gone)
b) The speaker symbols in the red circles are missing

My PDF output looks exactly like Lionel's

These issues are both handled in bug #436962, so I'll mark this bug as fixed

Changed in inkscape (Ubuntu):
status: Confirmed → Fix Released
Changed in inkscape (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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