aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-02-04 05:17:26 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-02-04 05:17:26 +0100
commit32e9acfa776e7474a83f171c63a6859e2e363efe (patch)
treeae332d5085349664dcd80b0b2f20778ff91ce34b
parentff7de4b141c1d8c52d64a573e85d65852a91f76a (diff)
downloadpdf-simple-sign-32e9acfa776e7474a83f171c63a6859e2e363efe.tar.gz
pdf-simple-sign-32e9acfa776e7474a83f171c63a6859e2e363efe.tar.xz
pdf-simple-sign-32e9acfa776e7474a83f171c63a6859e2e363efe.zip
Go: enable multiple updates in a sequence
This is not something anyone should do, but let's do things correctly.
-rw-r--r--pdf/pdf.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pdf/pdf.go b/pdf/pdf.go
index f6dda31..1fcdaa4 100644
--- a/pdf/pdf.go
+++ b/pdf/pdf.go
@@ -1271,6 +1271,9 @@ func (u *Updater) FlushUpdates() {
fmt.Fprintf(buf, "\nstartxref\n%d\n%%%%EOF\n", startXref)
u.Document = buf.Bytes()
+ u.updated = make(map[uint]struct{})
+
+ u.Trailer["Prev"] = NewNumeric(float64(startXref))
}
// -----------------------------------------------------------------------------