DEV Community

ARLing
ARLing

Posted on Originally published at arling.sk

PDF form fields: typing, pen notes and what to test

Originally published at https://arling.sk/notes/pdf-form-fields-in-a-journal-or-puzzle-pdf/

PDF form fields: typing, pen notes and what to test

A journal PDF and a puzzle PDF can pose the same quiet question: where do you put your answer? A ruled line is part of the page drawing. A form field is a separate box that a supporting reader lets you fill with a keyboard. Pen notes and text annotations are another way to add an answer, using the reader's own tools. They do not require the author to have put a form field under that particular line. A click that does nothing therefore tells you less than it first appears: the file, the reader and the selected tool all matter. This note explains how our fields are added to a finished file without changing its empty appearance, which puzzle types receive cell fields, and how to try typing, saving and reopening an answer before you commit to a book.

What a form field actually is

A form field is a box you can type into with a keyboard in a supporting reader. Our reading PDFs get theirs after the PDF is finished: a script walks the printed file and adds a one line text field over suitable grey writing lines. An empty field with no border and no fill draws nothing, so our comparison can check that the file still looks as it did before.

Finding the lines is the fussy part. With the settings used for Morning Quiet, a candidate is horizontal or a thin filled rectangle, its grey is near the value 0.541 in each channel, its stroke is at most 0.8 of a point thick and it is at least 20 millimetres long. A field must also avoid overlap with a link annotation on the same page. These are choices in our script, including a configurable minimum length, not rules that every PDF must follow. Avoiding links keeps a field from landing on top of a navigation row in the contents.

Why typing and pen notes are different

The distinction is between filling a prepared field and adding an annotation. Firefox documents both interactive fields and separate text and drawing tools; Adobe Reader describes Fill & Sign for non-interactive forms too. It would be wrong to say that a computer cannot write into a PDF without fields. Fields provide prepared places for an answer, while annotation tools offer another method whose behaviour you need to check in your reader.

The e-ink edition of Morning Quiet has 1038 fields on 118 of its 214 pages. Its free sample has 229 fields on 26 of its 52 pages. The number of pages containing fields is not the length of the book. Those counts come from inspecting the finished files; they do not establish how any particular tablet handles the fields.

Which grids can use fields in their cells

In a puzzle book, a text field would not suit every kind of answer, so not every type gets cell fields. We use them for Killer Sudoku, Anti-knight Sudoku, Kakuro, Nonograms, Star Battle, Nurikabe and Numberlink, where a digit, a mark for a filled cell, a star or a path number can record a cell's state.

Masyu gets no cell fields, because its answer is a loop between cell centres, and Slitherlink gets none either, because its answer sits on the edges between the dots. Hashi also needs drawn connections rather than text boxes. These types have note fields, while solution pages get no fields at all. In the e-ink edition of Puzzle Post Issue 1 there are 4457 fields: 4157 in grid cells and 300 over the ruled notes lines, with 598 links. These are counts for that edition; A4 has more note fields.

How to test an answer in your own reader

Open a known sample in a reader that supports forms and try a place intended for an answer. Type a short entry, save your own copy, close it and open it again. Check whether your entry survived. If clicking does nothing, check the active tool and the reader's support; that click alone does not prove that the file has no fields. Test annotation tools separately if those are how you intend to write.

There is a second question worth asking a seller: whether adding the fields changed the file. Our script compares the number of link annotations on every page and the pixels of every page rendered at 72 dots per inch before and after adding fields. A difference fails this check. In Morning Quiet the report records 592 links before and after, with identical pixels. This checks the processing step, not the behaviour of every reading application.

What we have not tested

Fields are measured in the file, not on a device. We have no recorded physical test of these files on reMarkable, Kindle Scribe, Boox or Supernote. Reader support and the visibility of the grey writing lines on an actual display remain things to try on your own device.

If you plan to type, try your own reader first with a free sample. The Morning Quiet sample contains 229 fields for that purpose. A successful test describes your file and reader, not a promise about every other combination.

FAQ

Do the fields change how the page looks?

Our empty fields have no border and no fill. The processing report confirms identical rendered pages before and after adding them. That is a measured result for the file, not a statement about how every reader highlights an active field.

Can I write with a pen and type on the same page?

Fields and annotations are separate features. Whether your reader lets you use both, and preserves both when saving, needs a test in that reader. Try one short entry of each kind in the sample and reopen your saved copy.

Why does my Masyu page have no cell boxes?

Because its answer is a loop along the edges between cell centres, not a mark inside a cell, so a box in the cell would be misleading; Slitherlink is left out for the same reason.

Where to look next

Try the free Morning Quiet sample first: days 1 to 7, with 229 fields and no account or email required. The full book has 1038 fields. The monthly issue with fields in the grids is Puzzle Post, whose e-ink edition has 145 pages and 598 internal links. The ten printable puzzle books are the print side of the same work, 100 puzzles each with solutions at 4.90 € a book.

ARLing also publishes printable puzzle books.

Top comments (0)