farling42 / fvtt-pdf-pager

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

FIllable PDF Sheet doesn't save changes #109

Closed eldritchkermit closed 1 month ago

eldritchkermit commented 1 month ago

I am on v12, using Simple Worldbuilding since Vagabond, the system I want to run, doesn't have a system yet. I have the fillable pdf set for the Actor sheet, but unfortunately any edits I make to actors using that PDF sheet do not seem to save, I am not sure as to what might be causing this.

farling42 commented 1 month ago

What version of Foundry, Simple Worldbuilding and the module are you using (specific numbers please).

eldritchkermit commented 1 month ago

image image

These are the versions I'm using.

farling42 commented 1 month ago

I tested with a fillable PDF sheet I found online called "VAGABOND - Hero Record.pdf" and it is all working as expected.

If that isn't the correct PDF, would you be able to provide me with the relevant PDF?

Could you also provide the module settings for PDF Pager. I had used the default settings when testing with the above PDF.

eldritchkermit commented 1 month ago

Sure, this is the version of the Hero Record I'm using:

Vagabond - Hero Record v15 (Form-Fillable).pdf

And these are the settings for PDF Pager that I am using:

image

image

image

I'm not sure since this is my first time using the module, but maybe I messed up something in the settings?

farling42 commented 1 month ago

In the "Field Mappings for Actors", can you replace your current text with the following:

{"Hero Name":"name"}

Also, untick "Show Mapping Tooltips".

Although it won't fix anything, it will check that the module is working. The Hero Name on the PDF sheet should be replaced with the name of the Actor that you're displaying in the PDF.

eldritchkermit commented 1 month ago

image

Done, I'm not sure if the name is displaying at all though.

farling42 commented 1 month ago

Oh, for the V1.5 sheet the syntax would be:

{"Name":"name"}

Could you open your browser window (F12 on windows 11), and look to see if any errors are being reported.

farling42 commented 1 month ago

I'm able to edit the attribute fields in the PDF, and that information gets saved.

If I edit any of the skill checks, then they get replaced as soon as I tab out of the field (because they are automatically calculated, and really should have been marked as read-only within the PDF itself).

farling42 commented 1 month ago

This is what my test looks like after closing and reopening the changed Actor sheet:

image

eldritchkermit commented 1 month ago

image

This is what my browser window shows me when I open it.

Edit: I have also changed the syntax, but the changes still aren't maintained.

farling42 commented 1 month ago

On opening that panel in your browser, can you click on the "Console" at the top, just to the right of "Elements". This might list some errors.

eldritchkermit commented 1 month ago

image

farling42 commented 1 month ago

I don't know why it is there, but can you delete "system.bonuses" from the text search box in your "Console" panel.

eldritchkermit commented 1 month ago

image

image

The second error is just the result of a misclick on my part, a warning about the screen resolution since I had accidentally shrunk the Foundry browser window.

farling42 commented 1 month ago

At the top of the Console panel, can you change "Default Levels" to "All Levels" and then open the PDF sheet and try making some changes. It should report each change that you make.

eldritchkermit commented 1 month ago

image

farling42 commented 1 month ago

That looks good. All those messages about "Hiding value..." indicate that the text you are typing in is being saved on the associated actor. Do more log entries appear when you type text into any of the PDF fields?

eldritchkermit commented 1 month ago

Ok, so, I opened it up and it seemed like it had saved my previous changes, but then I tried to add another change, closed it and opened it up again and it reset back to the default version of the pdf, for some reason.

image

This is what the console showed me.

eldritchkermit commented 1 month ago

Ok, I've been running this on the Forge so far, but now I've tried replicating this on my desktop version of Foundry, and it loads and saves just fine, so I guess the problem is with the Forge or with my browser, sorry for the issue.

farling42 commented 1 month ago

There's a lot of automation built into the PDF document, which might also cause some issues.

It might be worth marking some fields as read-only within PDF Pager so that PDF pager doesn't try to modify them when the rules inside the PDF are also trying to change some values.