Skip to content

Commit

Permalink
Fix #679, #680
Browse files Browse the repository at this point in the history
  • Loading branch information
hhrutter committed Aug 23, 2023
1 parent b42e6eb commit c135369
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkg/pdfcpu/validate/annotation.go
Expand Up @@ -1427,7 +1427,11 @@ func validateAnnotationDictGeneral(xRefTable *model.XRefTable, d types.Dict, dic
}

// NM, optional, text string, since V1.4
_, err = validateStringEntry(xRefTable, d, dictName, "NM", OPTIONAL, model.V14, nil)
sinceVersion := model.V14
if xRefTable.ValidationMode == model.ValidationRelaxed {
sinceVersion = model.V13
}
_, err = validateStringEntry(xRefTable, d, dictName, "NM", OPTIONAL, sinceVersion, nil)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/pdfcpu/validate/xObject.go
Expand Up @@ -528,7 +528,7 @@ func validateImageStreamDict(xRefTable *model.XRefTable, sd *types.StreamDict, i
// SMask, stream, optional, since V1.4
sinceVersion := model.V14
if xRefTable.ValidationMode == model.ValidationRelaxed {
sinceVersion = model.V13
sinceVersion = model.V12
}
sd1, err := validateStreamDictEntry(xRefTable, sd.Dict, dictName, "SMask", OPTIONAL, sinceVersion, nil)
if err != nil {
Expand Down

0 comments on commit c135369

Please sign in to comment.