mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-27 13:48:51 +08:00
Merge pull request #438 from adrg/fix-reader-page-count
Account for page count being a reference in the reader
This commit is contained in:
commit
15bd7e8b70
@ -214,7 +214,7 @@ func (r *PdfReader) loadStructure() error {
|
||||
common.Log.Debug("ERROR: Pages object invalid (%s)", ppages)
|
||||
return errors.New("pages object invalid")
|
||||
}
|
||||
pageCount, ok := pages.Get("Count").(*core.PdfObjectInteger)
|
||||
pageCount, ok := core.GetInt(pages.Get("Count"))
|
||||
if !ok {
|
||||
common.Log.Debug("ERROR: Pages count object invalid")
|
||||
return errors.New("pages count invalid")
|
||||
|
Loading…
x
Reference in New Issue
Block a user