aboutsummaryrefslogtreecommitdiff
path: root/pdf/pdf.go
diff options
context:
space:
mode:
Diffstat (limited to 'pdf/pdf.go')
-rw-r--r--pdf/pdf.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pdf/pdf.go b/pdf/pdf.go
index 120c238..075e34c 100644
--- a/pdf/pdf.go
+++ b/pdf/pdf.go
@@ -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 {