Editing PDF-Attachment

Hello,

I'm using Joplin 1.6.8 (Win10 Pro). I tired to edit some attachment.
With Word documents it's working. But I can't modify PDF attachments.
Is there anything else to know? :wink:

I don't have another machine to test, can't someone test it, too?

Thanks in advance.
Marvin

Works for me. Have you set your PDF Editor software as the default handler for PDF files on your system?

@dpoulton It is. I will take a closer look the next days. Strange Word-files can be modified ....

@dpoulton: I tested it serveral times without any success

When I open the PDF file with conext menu in the editor (pre-view) with open, the PDF will be opened.
Making some changes and pressing save, I'm asked to overwrite the file.
In the Save dialog the following path is shown

...\Users\xxx.config\joplin-desktop\tmp\edited_resources

After saving and (re-) opening the file the modifications are gone.

If I open the resource directory over "Show file in folder" the following path will be opened

...\Users\xxxx.config\joplin-desktop\resources\

If I modify the PDF in that directory, the modification is saved!

One hint: the filenames differs in both cases, case one the "original" name and case 2 a cryptic name.

image

I don't know what the exact issue is, but you should know that if you directly change files in the profile directory you'll likely have even more problems. For example, while the changes are of course saved (after all you're directly editing a file), they won't be synced.

I cannot duplicate this.

If I click the pdf link in the rendered note (or right-click open) it appears that Joplin creates a temporary copy of the pdf resource (say, C:\Users\<username>\.config\joplin-desktop\resources\5c36ba4e75424f8086c10e763d70ffb9.pdf) in C:\Users\<username>\.config\joplin-desktop\tmp\edited_resources. This copy uses the filename stored by Joplin when the file was originally attached as the temporary file's filename (Test_PDF.pdf). The file opens using the default editor.

If I then edit and save I am not prompted to overwrite the file as a "Save" occurs of the open temporary file, not a "Save as...". The change is passed to 5c36ba4e75424f8086c10e763d70ffb9.pdf and immediately visible in Joplin (if the PDF viewer is active). The edited file is synced to all clients. Moving to another note causes Joplin to stop monitoring the PDF file and the copy is deleted from the \tmp\edited_resources folder.

As @laurent says, if changes are made by editing the resource directly (in this case C:\Users\<username>\.config\joplin-desktop\resources\5c36ba4e75424f8086c10e763d70ffb9.pdf) any changes will be visible to the client on which the edit is performed. But as Joplin has not been monitoring this the changed file is not synced to any other clients.

@laurent @dpoulton Thanks for your answers and the "warning" for possible sync problems.
I'm only testing around a try to find a clue for that. Maybe it's important to know I don't have admin rights on that machine.
Marvin

I've installed Joplin to my home system (Manjaro with Gnome) and tested this, too.
There it works as it should. Changes are saved (with asking if want to ...)

Marvin

@laurent
• Open a PDF file from the editor
image

• Change the document and save
image

• A dialogue opens and asks if I want to overwrite the file
image

• The note in Joplin is not “updated”
image

• Opening the PDF shows an updated file
image

Changing the note, going back to this note, and opening the PDF. The changes are gone.

I hope this will help you.
Kind regards,
Marvin

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.