A Newbie's question regarding PDF

There is a lot I don’t know about Vassal but it seems there is only one way to add a Fillable Log Sheet to a module. That is to create multiple (at the moment about 350) Pieces with a Text Trait and position them on the appropriate board. Very time consuming. There may be another way to do this but I have looked through other Modules and this seems to be about it. I have a PDF editor and I can create a PDF Log with editable fields with it in 10 minutes which much less than the hours required using the method above. Is it likely or possible that future Vassal mods could import an editable PDF (with Form Fields) that could be used within the Game? Thus reducing the time it takes significantly.

Regards;
Darren

Hi Darren,

You can add as many PDFs as you like to the Documenation element of your module. These will show up as entries in the Help many. A PDF will be shown on the target machine via the users preferred PDF viewer (Acrobat reader, Evince, Okular, etc.). The PDF viewer may or may not support editable fields.

However, the editted PDF will not be stored with the game log. In fact, every time the user selects the Help menu entry, a fresh PDF will be extracted from the module and presented to the user.

One way to deal with this is to tell your users to save the PDF and open the saved PDF between sessions of a game, including sending the PDF along the VLOG in PBEM. For online games something else has to be done.

If it is important that the filled in values are reflected in the game log (VLOG), then your best choice is probably to make a separate board with specific pieces.

You may want to consider to use my Python VASSAL API to automatise this.

Yours,
Christian

1 Like

Hello Christian;
What I meant by an editable Log are the mission Charts and Logs for a particular game. I had tried uploading an Editable PDF in the Help file Section and it opened the PDF in my default PDF viewer, however, when I saved the game and reopened it later, that PDF was blank again. Vassal does not seem to store an edited PDF. I am talking about the Form Fields you can add to a PDF so you can write on it in any PDF browser. OK, I could just open the PDF Form in it’s separate dedicated Browser and edit/save it externally but I am thinking of portability, if I upload a completed module it would be nice to think it contains all that is needed to play the game without any extra software required. I would be in way over my head with your Python Vassal, I have been trying very hard these past 2 weeks to understand all things Vassal and having some difficulty.

Thank you for taking the time to respond.

Regards;
Darren

Hi,

When you open a PDF from the Help menu, then VASSAL extracts the file from the module (a zip archive) to a temporary file. Then VASSAL asks the OS to open the file with some external viewer. If the file is modified by the external viewer it is not added back to the module, nor log file.

This is why I said you cannot save such changes in a VLOG as you also observed. Essentially VASSAL is not aware of changes made in the external application.

VASSAL does not have its own PDF viewer, so platform neutrality is in no way guarantied. The use of a PDF will always rely on third party applications. A PDF viewer isn’t as easy to implement as one might think (Adobe is playing fast and lose with the format).

If you need to record user changes, then you are stuck with VASSAL elements, unless you ask users to keep a record in a seperate PDF (for which you provide a template).

If you have a little programming experience it shouldn’t be too difficult to write code that automatically generates your log board. You can then run that script once on your base VMOD to create that board in the VMOD.

Yours,
Christian