#1488·pdfcpu

Strict validator rejects type1 standard fonts without FirstChar on PDF 1.7

Author: diogotcorreiaCreated Sep 16, 2026Updated Sep 16, 2026
Labelsinvestigate
❯ pdfcpu validate -m strict store/snapshots/forms_text_field.pdf
validating(mode=strict) store/snapshots/forms_text_field.pdf ...
validate store/snapshots/forms_text_field.pdf: validation error (obj#:12) (try --mode=relaxed): document catalog: catalog AcroForm: Font resource ff0: font dict Subtype Type1: dict=type1FontDict required entry=FirstChar missing

❯ pdfcpu info store/snapshots/forms_text_field.pdf
store/snapshots/forms_text_field.pdf:
              Source: store/snapshots/forms_text_field.pdf
         PDF version: 1.7
          Page count: 1
          Page sizes: 200.00 x 200.00 points
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
               Title:
              Author:
             Subject:
        PDF Producer:
     Content creator:
       Creation date:
   Modification date:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
              Tagged: No
              Hybrid: No
          Linearized: No
  Using XRef streams: No
Using object streams: No
         Watermarked: No
          Thumbnails: No
          Signatures: No
          AppendOnly: No
            Outlines: No
               Names: No
                Form: Yes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
           Encrypted: No
         Permissions: Full access
12 0 obj
<<
  /Type /Font
  /Subtype /Type1
  /BaseFont /Times-Roman
>>
endobj

According to Table 111 of the PDF 1.7 specification, FirstChar, LastChar, Widths, and FontDescription are not required for the standard 14 fonts.

File: forms_text_field.pdf


Probably unrelated to the issue, but:

❯ pdfcpu version
version: v0.15.0 dev
 config: /home/dtc/.config/pdfcpu/config.yml
 commit: f2686555086a2e76dc19f602ea1897f6e3baae4d
   date: 2026-08-11 22:50:54 UTC
     go: go1.26.7

OS: NixOS 26.05 (Linux 6.18.49)


Fix is a 2 characters change at https://github.com/pdfcpu/pdfcpu/blob/105c0c28727afe7f85eb3179d03e9810d8774981/pkg/pdfcpu/validate/font.go#L793 I have a PR ready that will be opened shortly.