flxzt / rnote

Sketch and take handwritten notes.
https://rnote.flxzt.net
GNU General Public License v3.0
8.35k stars 293 forks source link

Some PDF objects are not rendered in the correct position #1249

Open tubbadu opened 1 month ago

tubbadu commented 1 month ago

Describe the bug
Some objects of the PDF are rendered in the wrong position, making the document very difficult to read

To Reproduce
Steps to reproduce the behavior:

  1. open the attached PDF with rnote
  2. import is as vector
  3. see it's rendered wrong

Expected behavior
The pdf is rendered correctly

Screenshots
how it's rendered by rnote: image

interested pdf: TESTPDF.pdf

how it should be rendered (screenshot from Okular): image

This does not happens when importing the pdf as bitmap instead of vector

Desktop (please complete the following information):

Doublonmousse commented 1 month ago

Related : #526 As explained in https://github.com/flxzt/rnote/issues/526#issuecomment-1439170212, either a conversion issue in poppler (pdf to svg) or in the rendering (usvg/cairo)

Doublonmousse commented 1 month ago

After a quick test using pdf2svg (poppler -> cairo to do a pdf to svg conversion) it seems to work fine doing that. So it's probably an usvg-related rendering issue.

In fact converting first the pdf to svg (which is rendered correctly) then importing it within rnote will show it incorrectly. Gonna need a little bit more time to find why and link to an usvg issue

Version used :

pdf2svg 0.2.3_6
poppler 24.04.0
cairo 1.18.2