diff options
Diffstat (limited to 'pdf/pdf.go')
-rw-r--r-- | pdf/pdf.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -503,6 +503,17 @@ type Updater struct { Trailer map[string]Object } +// ListIndirect returns the whole cross-reference table as Reference Objects. +func (u *Updater) ListIndirect() []Object { + result := []Object{} + for i := 0; i < len(u.xref); i++ { + if u.xref[i].nonfree { + result = append(result, NewReference(uint(i), u.xref[i].generation)) + } + } + return result +} + func (u *Updater) parseStream(lex *Lexer, stack *[]Object) (Object, error) { lenStack := len(*stack) if lenStack < 1 { |