mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-26 13:48:55 +08:00
Set Pages dict Type if not set (#419)
This commit is contained in:
parent
ca4f19e5e8
commit
d34ba3c29e
@ -219,6 +219,10 @@ func (r *PdfReader) loadStructure() error {
|
||||
common.Log.Debug("ERROR: Pages count object invalid")
|
||||
return errors.New("pages count invalid")
|
||||
}
|
||||
if _, ok = core.GetName(pages.Get("Type")); !ok {
|
||||
common.Log.Debug("Pages dict Type field not set. Setting Type to Pages.")
|
||||
pages.Set("Type", core.MakeName("Pages"))
|
||||
}
|
||||
|
||||
r.root = root
|
||||
r.catalog = catalog
|
||||
|
Loading…
x
Reference in New Issue
Block a user