Skip to content

Commit

Permalink
Fix for 'did not set root object'
Browse files Browse the repository at this point in the history
  • Loading branch information
phpdave11 committed Feb 13, 2020
1 parent d855833 commit bc96c84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ module github.com/phpdave11/gofpdi

go 1.12

require (
github.com/pkg/errors v0.8.1
)
require github.com/pkg/errors v0.8.1
3 changes: 2 additions & 1 deletion reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,8 @@ func (this *PdfReader) readXref() error {
// Just set the whole dictionary with /Root key to keep compatibiltiy with existing code
this.trailer = v
} else {
return errors.New("Did not set root object")
// Don't return an error here. The trailer could be in another XRef stream.
//return errors.New("Did not set root object")
}

startObject := index[0]
Expand Down

0 comments on commit bc96c84

Please sign in to comment.