lundi 8 mars 2021

Do checkboxes default to unchecked in a PDF

I would like to extract the values of checkboxes within a PDF, using Python. I have some code for doing this, which seems to work fine. However, some checkbox elements don't have a /V attribute (which is usually set to "Yes" or "Off" to indicate whether the checkbox is checked, as per the PDF standard).

In these cases, where the checkboxes don't have a /V (value) or /DV (default value) key in their field dictionary at all, is it safe to assume the checkbox is unchecked? It makes sense for me that this would be the case, but my feeling is that making sense isn't a good indicator of how PDF files really work. I'd love to have a reference to some specification document or documentation that says unequivocally, "If a PDF viewer can't find a /V or /DV, it shall render the checkbox as unchecked."

Thanks so much for your help!




Aucun commentaire:

Enregistrer un commentaire