We have moved to a new Sailfish OS Forum. Please start new discussions there.

Can't create notes in pdf

Tracked by Jolla (In release)

asked 2019-08-22 01:10:45 +0300

Fuzzillogic gravatar image

The document reader supports highlighting and adding notes to PDFs. Highlighting works, but creating notes doesn't. When adding a note, you can specify a location, start typing, and then save the note, but after that nothing has changed. There is no indication of a note whatsoever.

When viewing the modified PDF (with added highlight and attempt to add a note) on Okular 1.7.3 on the desktop, the highlighting appears, but the note is not there. It's also missing from the Review contents. The note I tried to add really isn't there, not just hidden or something.

When I use Okular to add some other annotations, including notes, and send it back to my phone, all the added annotations, including added notes, are showing and working just fine.

I'm using SFOS on an XA2.

edit retag flag offensive close delete



Can reproduce easily, will correct later today. Sorry for missing this regression.

Damien Caliste ( 2019-08-22 08:48:58 +0300 )edit

2 Answers

Sort by » oldest newest most voted

answered 2019-08-22 12:23:24 +0300

updated 2019-08-26 17:53:49 +0300

_Edit 2019-08-26_: I'm submitting another merge request for the positioning issue. Testing it, I've found some other regressions that the MR is addressing (content scrolling back to top on long press menu dismiss, note not created from long press menu, app crashing when deleting a note from the pulley menu of the edit page…). If you notice some other regressions or issues, don't hesitate to comment.

For the positioning issue, the fix is quite simple: edit the file /usr/lib/qt5/qml/Sailfish/Office/PDFDocumentPage.qml (the same than before), and at line 297, add view.contentX and view.contentY respectively to mouse.x and mouse.y. The view offset was missing in the creation of pt. For the other fixes, please look at the MR on Github if interested.

_Original answer_: The bug was a typo when rewriting the PDFDocumentPage.qml file to the new layout. I've created a merge request to correct it.

If you want, you can edit this file with devel-su vi /usr/lib/qt5/qml/Sailfish/Office/PDFDocumentPage.qml, at line 300, change the getPoitionAt with getPositionAt (there is a missing 's' in the middle).

edit flag offensive delete publish link more



Well... It kinda works. I can now add notes, but they appear always on the first page.

  1. Create a PDF containing two pages
  2. Add note somewhere on the first page
  3. Add note somewhere on the second page

Expected: notes are shown on the specified locations. Observed: both notes are on the first page. However, the position on the page is correct.

Fuzzillogic ( 2019-08-22 20:25:06 +0300 )edit

Thanks for the feedback. Too bad I tested with a one page PDF file only... I'll correct this tomorrow or on Monday.

Damien Caliste ( 2019-08-22 22:50:33 +0300 )edit

answered 2019-08-26 19:29:58 +0300

Fuzzillogic gravatar image

updated 2019-08-26 19:38:39 +0300

I've uploaded a patch for Patchmanager as "Sailfish Documents note fixes" containing the current set of fixes for these problems. Users of Patchmanager should be able to download and apply the fixes from the Web catalog in Patchmanager. After enabling the patch, you can add and edit notes. Easy does it! Thanks @Damien Caliste for the fixes!

edit flag offensive delete publish link more


That's really great. Good community contribution on this issue !

Damien Caliste ( 2019-08-26 23:04:12 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2019-08-22 01:10:45 +0300

Seen: 1,042 times

Last updated: Aug 26 '19