Adding a custom image field to a fillable RPG character sheet

I recently put up a post about making custom character sheet PDFs. In it, I had mentioned adding JavaScript code to a fillable PDF to add special features.

One of them is the feature to give a user, using an ordinary PDF reader, the ability to import their own image into a form. Usually this would be for a character portrait. Here’s how you can add that. You’ll need a PDF editor that lets you create and edit forms.

Example Character sheet I made for the Midnight Boulevard RPG
  • Open the PDF in an editor that will let you create PDF forms. I use Adobe Acrobat Pro
  • Open Form Editing mode
  • Create a form button control where you want the image to appear
  • Select the Properties of the button.
  • Set the Border Color and Fill Color dropdowns to No Color on the Appearance Tab. This will make the box invisible except for the image.
  • Set the Layout dropdown to Icon Only on the Options Tab
  • On the Actions tab, Choose Mouse Up on the Select Trigger dropdown box
  • Set the Select Action dropdown to Run a JavaScript
  • When the JavaScript Editor window opens, enter the following code:

event.target.buttonImportIcon();

You can now click OK and save the form. Whenever the form is opened in a form-compatible PDF reader, a user can click on that area, and a dialog will appear to let the user import the image of their choice.

Alternately, you can just download one of the many character sheets I’ve designed and just copy the image box I used. All of them are named Portrait. You can copy and paste it directly onto your PDF form.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s