Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -1353,8 +1353,13 @@ func (this *PdfReader) getPageContent(objSpec *PdfValue) ([]*PdfValue, error) {
if err != nil {
return nil, errors.Wrap(err, "Failed to resolve object")
}
contents = append(contents, content)
} else if objSpec.Type == PDF_TYPE_ARRAY {
if content.Value.Type == PDF_TYPE_ARRAY {
objSpec = content.Value
} else {
contents = append(contents, content)
}
}
if objSpec.Type == PDF_TYPE_ARRAY {
// If objSpec is an array, loop through the array and recursively get page content and append to contents
for i := 0; i < len(objSpec.Array); i++ {
tmpContents, err := this.getPageContent(objSpec.Array[i])
Expand Down