farling42 / fvtt-pdf-pager

PDF Pager for Foundry
MIT License
6 stars 4 forks source link

Images added are selected for editing when PDF is reopened. #112

Closed 4m2c4bl3 closed 2 months ago

4m2c4bl3 commented 2 months ago

This persists across even restarting the server/people's pcs. It is there both for people who have permission to edit images, and for people who do not. Foundry v12.330

image image

image

farling42 commented 2 months ago

Those are annotations which are present in the PDF being displayed.

All users will be able to see them, but only the owner of the PDF will be able to modify/delete them.

The included console log shows warnings from the Ownership Viewer, which are not relevant to this issue.

4m2c4bl3 commented 2 months ago

The issue isn't that the annotations are showing up, it's that one is always selected. The delete button/etc options are always there for everyone, and the second screenshot account (with no editing permissions, see there aren't the options to edit in the top right hand side) CAN hit those buttons and move/delete/etc the image.

farling42 commented 2 months ago

Can you tell me the version of Foundry, PDF Pager, and the game system and it's version please.

In my Foundry V12 installation, a user without edit permission on the document does not see the edit annotation controls.

Also, are you certain that the player is not Owner of either the document or the individual page?

4m2c4bl3 commented 2 months ago

foundry v 12.330, chrome, PDF pager latest version (1.4.0), on Chrome (v127.0.6533.100). I noticed the issue in the previous version as well, just haven't had time to make a report. System is project-fu .

Also since the last time it was an issue based on the config options, here's my PDF pager config options:

image image

Example of the weird semi-fake-strange permissions the users have is below. https://github.com/user-attachments/assets/4b8735f4-6223-47fc-8f5a-d5d25c781ec9

4m2c4bl3 commented 2 months ago

Also for the ownership, they don't have the options to edit, which I understand indicates ownership vs not. image I did double check using an extension, they should only have observer permission on the journal, and inherit permissions on the page. Journal Permissions: image Page Permissions: image

farling42 commented 2 months ago

Are you using anything like Monk's Enhanced Journal, or some other module that wraps the default JournalEntry sheet?

farling42 commented 2 months ago

Could you try version 1.4.1 to see if that fixes the problem. I have changed how I determine if a PDF is editable.

4m2c4bl3 commented 2 months ago

sorry for the delay in replies. i don't think i'm using anything that affects journals at all. i'll try and do a hunt to see if any other modules are interfering. the issue is still there in 1.4.1. i don't even know if it's a permissions thing, because when i load the pdfs on my gm account, it also can move the image around and has it selected when i scroll to the page, before i enable editing annotations from the top bar.

4m2c4bl3 commented 2 months ago

i figured out what causes it! if you copy paste an image you already inserted, the behavior happens. reproduced on a completely fresh world with no other modules installed.

farling42 commented 2 months ago

Ah, thanks for finding how to reproduce the issue. I will look into it later.

1.4.1 should help with permissions related to things in compendiums.

farling42 commented 2 months ago

I've managed to reproduce the issue, and it is related to having multiple images (PDF calls them "stamps") as annotations.

Hopefully version 1.4.2 will improve the handling for stamps, so that the editor controls don't remain on display.

4m2c4bl3 commented 2 months ago

the editor controls are visible for a moment, but then they disappear. good enough for my players and me, thank you again!

farling42 commented 2 months ago

the editor controls are visible for a moment, but then they disappear. good enough for my players and me, thank you again!

Yes, unfortunately the loading of images takes some time by the PDFjs library, so I have to delay disabling the edit tools until the images have finished loading.