Skip to content

Commit

Permalink
Relax validation for FontDescriptor Lang
Browse files Browse the repository at this point in the history
  • Loading branch information
hhrutter committed Nov 30, 2021
1 parent 9616d4b commit 72e4e71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/pdfcpu/validate/font.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,11 @@ func validateFontDescriptor(xRefTable *pdf.XRefTable, d pdf.Dict, fontDictName s
}

// Lang, optional, name
_, err = validateNameEntry(xRefTable, d1, dictName, "Lang", OPTIONAL, pdf.V15, nil)
sinceVersion := pdf.V15
if xRefTable.ValidationMode == pdf.ValidationRelaxed {
sinceVersion = pdf.V14
}
_, err = validateNameEntry(xRefTable, d1, dictName, "Lang", OPTIONAL, sinceVersion, nil)
if err != nil {
return err
}
Expand Down

0 comments on commit 72e4e71

Please sign in to comment.