farling42 / fvtt-pdf-pager

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

Issue with clearing fillable forms using PDF Pager #95

Closed DarkSerpent closed 4 months ago

DarkSerpent commented 5 months ago

Hello, I am having issues with rendering and editing fillable forms in PDF Pager. This issue occurs with PDFs sourced from various locations, and only occurs with PDF Pager's editor (although I am not definitive the issue is 100% caused by PDF Pager, could be pdfjs?). I will attempt to detail everything:

The following link will take you to a Google Drive, split into two folders: one with working PDFs, and ones where the PDFs suddenly stopped working (3 of each).

I am currently using PDF Pager 0.52.7, but this issue began several versions ago. The exact date this issue first appeared for my group is March 23rd, 2024. Attached to this post is a video of the issue occurring on one of my player's sheets as a visual. Thank you in advance.

EDIT: Foundry Version 11.315, libWrapper Version 1.12.13.0

https://github.com/farling42/fvtt-pdf-pager/assets/12854153/fdfdc2cf-de2d-425f-b8c1-f2233499854e

farling42 commented 5 months ago

Hi, if you disabled the PDF Pager module and then create a journal PDF page with your SWsheet PDF. You can edit the sheet from the normal journal pdf.

On Foundry 11, in the journal PDF page, entering some text into a field and then clicking outside the PDF page window does not save the changed value; this also occurs if you delete any characters and then click outside the PDF window. On initially clicking outside the window the fields shows the new value, but clicking back inside the field restores the previous field.

If you make the change and press the TAB key then the value is saved properly.

This indicates that is an issue with the core pdf.js library shipped with Foundry.

On both Foundry 10 and 12 it is working properly. Foundry 10 has pdf.js version 2.14.305 Foundry 11 has pdf.js version 3.4.120 (doesn't work with SWsheet) Foundry 12 has pdf.js version 4.0.379

farling42 commented 5 months ago

You could try updating your foundry server installation to use the same version of pdf.js as will be available in Foundry 12. The download link is https://github.com/mozilla/pdf.js/releases/download/v4.0.379/pdfjs-4.0.379-dist.zip

The contents of the zip should replace the contents of <appinstallpath>\resources\app\node_modules\@foundryvtt\pdfjs

(You should be able to rename the old pdfjs if you want to keep it as a backup.)