From 2ce268ea4d63752dd9d0eb402d1e314ae3509a2a Mon Sep 17 00:00:00 2001 From: Paul van Brouwershaven Date: Wed, 29 Jun 2022 21:04:33 +0200 Subject: [PATCH] Fix fpr PDF 2.0 xref tables --- sign/pdfxref.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sign/pdfxref.go b/sign/pdfxref.go index 96d411e..1a87919 100644 --- a/sign/pdfxref.go +++ b/sign/pdfxref.go @@ -28,8 +28,8 @@ func (context *SignContext) writeXref() error { func (context *SignContext) writeXrefTable() error { // @todo: maybe we need a prev here too. - xref_size := "xref\n0 " + strconv.FormatInt(context.PDFReader.XrefInformation.ItemCount, 10) - new_xref_size := "xref\n0 " + strconv.FormatInt(context.PDFReader.XrefInformation.ItemCount+4, 10) + xref_size := "xref\n0 " + strconv.FormatInt(context.PDFReader.XrefInformation.ItemCount, 10) + "\n" + new_xref_size := "xref\n0 " + strconv.FormatInt(context.PDFReader.XrefInformation.ItemCount+4, 10) + "\n" if _, err := context.OutputBuffer.Write([]byte(new_xref_size)); err != nil { return err