Fix PDF 1.7 with XRef Stream causes panic #61
This commit is contained in:
@@ -49,6 +49,10 @@ func (context *SignContext) writeTrailer() error {
|
||||
if _, err := context.OutputBuffer.Write([]byte(trailer_string)); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if context.PDFReader.XrefInformation.Type == "stream" {
|
||||
if _, err := context.OutputBuffer.Write([]byte("startxref\n")); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Write the new xref start position.
|
||||
|
Reference in New Issue
Block a user