Issues displaying SVGs


I created a PDF using GoodNotes. I then extracted a portion of the PDF using both internal and external (Cairo) importer in InkScape. The SVG file is not displayed correctly (see top text in attachment) however in InkScape itself and in the standard gnome image viewer it is. I’ve also added how it’s supposed to look using a PNG.

Notably, this issue only applies to text written and not shapes etc.

OS: Fedora 39 Workstation
Version: (X86_64)
Build ID: 60(Build:1)
CPU threads: 12; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: es-ES (de_DE.UTF-8); UI: de-DE
Calc: threaded

SVG.odt (14.0 KB)
SVG.pdf (29.2 KB)

After saving as .fodt and looking at the XML, I see that both images have mime-type image/png. I have not decoded the binary data but the length of the block is much smaller for the first one.

Opening your document as .zip confirms this: 1.6k for the first, 5.1k for the second. Images in the file display exactly as your screenshot, meaning they were recorded as such. Both are PNGs.

Check your extraction procedure.

Sorry, I pasted the wrong file into the document, here is the fixed version:

SVG fixed.odt (22.9 KB)
SVG fixed.pdf (27.6 KB)

You probably tried to tweak the image or the frame.

  1. right-click on buggy image and Properties
  2. in Position & Size tab, press kbd>Original Size
  3. OK

Image now displays like in the viewers. I assume you clipped the original “text” to “Thi”. I write “text” with quotes because the SVG is a set of path directives.

I think somehow the svg file got screwed up again. When I saved it, it wasn’t that distorted.
The file attached should be what I’m seeing and what is also presented in the PDF

SVG fixed (1).odt (33.9 KB)
SVG fixed (1).pdf (23.8 KB)

Is the “screw up” the partial erasure of text as if you rubbed it applying light pressure ? I thought this was intentional?

Yes, the scew up is the partial erasure. The SVG should be displayed like the PNG beneath it.

The image contained the zipped .odt (by changing extension to .zip) is the partially erased “text”.

But, I see there are two instances of your image: an .svg and a .png. The PNG is partially erased. I assume than PNG takes precedence over SVG. What is strange is content.xml references three images, not two. The first two SVG+PNG are in the same frame. Your reference image is alone in its own frame.

I am busy this afternoon. So, I can’t experiment to try and improve the situation, but I’ll give it a try as soon as I am back.


Back home, I experimented. Since there are a PNG and an SVG for the same image, I assume that PNG has priority over SVG for display. Consequently, I erased the XML element describing the PNG. I got a buggy .odt with “The document is damaged. Do you want Writer to repair it”. No repair possible and Writer exits.

The embedded SVG is correct with crisp black letter strokes while the PNG version has this cloudy stoked.

From my point of view, the process creating the final “image” is at fault. It could be “GoodNotes” which already hands over a combination PNG+SVG. Inkscape sees only the SVG part. But, then, how do you insert from Inkscape into Writer: through the clipboard copy-paste? saving in a file then Insert>Image? The problem is to determine “who” is creating the PNG version.

Is GoodNotes a proprietary app needing registration? I know cases where watermarks are added by unregistered apps. This cloudy look in PNG could be such a feature. It is easier to simulate partial erasure in PNG than in SVG.

I removed the XML element in question:

<draw:image xlink:href="Pictures/10000001000000BA0000002A697742EE67B3C947.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:mime-type="image/png"/>

zipped the contents and opened the .odt file seamlessly in Writer. File saved, the XML element describing the PNG reappears.

Just a note:

An ellipse created in Draw, exported to .svg file and then inserted into a blank Writer document.
The internal folder \Picture contains two files (.png and .svg). The content.xml file lists both .png and .svg in the same frame.

Consider the AddReplacementImages parameter (Expert Configuration), which takes the value true by default. Setting it to false and here we go again — an ellipse created in Draw, exported to .svg file and then inserted into a blank Writer document. Result:

  • the \Picture folder will have only .svg file
  • content.xml lists only .svg file in the frame.

Checked with the file provided by OP i.e. “SVG fixed (1).odt”, AddReplacementImages = false. File opened in Writer and saved.
Result: only .svg file and one .png file (reference image) in internal entries (content.xml and \Picture).

1 Like

I think SVG itself isn’t the problem since it’s displayed correctly in other apps and in Inkscape I can only see paths.

I don’t think there are any watermarks embedded since I just extracted it from a vector PDF export.

Opening the SVG in a code editor also shows no binary data (apart from colour profiles).

My theory is, the PNG is some kind of thumbnail.

What do you see when you open the .svg image embedded in your file


in Draw?

1 Like shows the same as in the second picture (lnkscape).

@theoware: what “This is a test” hand-written with a stylus? It looks like the 3 “s” and 2 “i” are not the same as we could expect if this came from a fancy font.

In this case, did you draw the letter with constant speed or were there "stop-and-go"s in your hand-writing? Then GoodNotes could have recorded these speed hazards as independent strokes.

I suspect a behaviour similar to the one I describe as possible in tdf#158246 which was filed further to question Why will the intersection of two line become white. Though the tool was OneNote there, the same behaviour could be involved: too sophisticated an interpretation of SVG by Draw.

I see the same as you do in Draw

Yes, it was hand-written using a stylus.

I’ve just tested doing shapes. They are not affected.

I wrote most of the individual letters in one go.

The two bugs could definitely be related