[Libreoffice-bugs] [Bug 109025] New: Vector graphics not 100% identical/ precise in prints and generated PDFs

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Jul 8 17:27:08 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=109025

            Bug ID: 109025
           Summary: Vector graphics not 100% identical/precise in prints
                    and generated PDFs
           Product: LibreOffice
           Version: 5.3.4.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: minor
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: christian-philipp at worring.net

Created attachment 134554
  --> https://bugs.documentfoundation.org/attachment.cgi?id=134554&action=edit
All the files necessary to reproduce the problem & detailed screenshots

I stumbled upon some odd behaviour when printing and/or generating PDFs from
documents containing vector graphics.

When inserting a vector graphic (tested with SVG, PDF 1.4, PDF 1.5 and EMF)
into a document (tested in Writer and Draw) and generating a PDF from this
document (either with LO's internal function or with FreePDF as a printer), the
vector graphics are still vector graphics in the PDF, however they appear kind
of "jagged" and unprecise, as if the Bézier node positions and values were
approximated or very "generously rounded" (looking at the resulting PDF file
with Adobe Reader DC 17.2304 and Inkscape 0.92.1).

I investigated a bit further and had a look at the nodes in Inkscape, comparing
the original SVG to the generated PDF: Some of the smooth nodes (with
symmetrical handles, depicted as a square in Inkscape) are converted to cusp
nodes (with asymmetrical handles, depicted as a rhombus in Inkscape) and vice
versa, resulting in deviations that (depending on the path and scale) go from
slight / barely visible to clearly visible and ugly. Furthermore the nodes do
not seem to be at the exact same coordinates.

As I apparently can only attach one file here, I put all the files in a ZIP
archive:

sample.svg
original SVG file

sample_pdf_1.4.pdf
original SVG file saved as PDF 1.4 with Inkscape 0.92.1 (using sample.svg as
the source)

sample_pdf_1.5.pdf
original SVG file saved as PDF 1.5 with Inkscape 0.92.1 (using sample.svg as
the source)

sample.emf
original SVG file saved as EMF with Inkscape 0.92.1 (using sample.svg as the
source)


vector_graphics_inserted.odg
Draw document with the vector graphics inserted

vector_graphics_inserted.pdf
Draw document exported as PDF (PDF options: Losless compression, everything
else unchecked)

inkscape_screenshot_01.png
Screenshot of a general comparison of the original SVG and the generated PDF
file (Inkscape 0.92.1)

inkscape_screenshot_02.png
Screenshot of a comparison of the nodes in the original SVG and the generated
PDF file (Inkscape 0.92.1)

inkscape_screenshot_03.png
Screenshot of a detailled comparison of some nodes in the original SVG and the
generated PDF file (Inkscape 0.92.1)



Steps to reproduce the problem:

- open Draw

- insert one or more vector graphics, either by drag & drop or by using
"Insert" => "Image"

- export the document to PDF

- open the resulting PDF in Adobe Reader or Inkscape and zoom in



Important note: The EMF file that I created from the SVG file in Inkscape shows
very similar symptoms even before inserting it into Draw - the nodes are not
exactly how they should be according to the original SVG file. Inserting this
EMF file into Draw and generating a PDF will make things worse, so the
resulting nodes in the PDF are even "more wrong" than before.

I have a hunch that there is a decimal precision loss happening at some point.
And could it be that LO and Inkscape are using the same libraries for doing
certain vector conversions?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170708/558eba9c/attachment-0001.html>


More information about the Libreoffice-bugs mailing list