Fix test removed invalid source test file

This commit is contained in:
Paul van Brouwershaven
2025-05-12 10:57:42 +02:00
committed by Paul van Brouwershaven
parent bf1f861031
commit 0f834debb7
4 changed files with 5 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ func (context *SignContext) createCatalog() ([]byte, error) {
// If an incremental upgrade requires a version that is higher than specified by the document.
// Ensure PDF version is at least 1.5 to support SigFlags in acroFormDict (1.4) and UF in the fileSpecDict (1.5)
if v, err := strconv.ParseFloat(context.PDFReader.PDFVersion, 64); err == nil && v < 1.5 {
catalog_buffer.WriteString(" /Version /1.5")
catalog_buffer.WriteString(" /Version /1.5\n")
}
// Retrieve the root, its pointer and set the root string

View File

@@ -21,11 +21,11 @@ var testFiles = []struct {
},
},
{
file: "../testfiles/testfile21.pdf",
file: "../testfiles/testfile12.pdf",
expectedCatalogs: map[CertType]string{
CertificationSignature: "<<\n /Type /Catalog\n /Metadata 8 0 R\n /Names 6 0 R\n /Pages 9 0 R\n /AcroForm <<\n /Fields [16 0 R]\n /SigFlags 3\n >>\n>>\n",
UsageRightsSignature: "<<\n /Type /Catalog\n /Metadata 8 0 R\n /Names 6 0 R\n /Pages 9 0 R\n /AcroForm <<\n /Fields [16 0 R]\n /SigFlags 1\n >>\n>>\n",
ApprovalSignature: "<<\n /Type /Catalog\n /Metadata 8 0 R\n /Names 6 0 R\n /Pages 9 0 R\n /AcroForm <<\n /Fields [16 0 R]\n /SigFlags 3\n >>\n>>\n",
CertificationSignature: "<<\n /Type /Catalog\n /Version /1.5\n /Outlines 2 0 R\n /Pages 3 0 R\n /AcroForm <<\n /Fields [16 0 R]\n /SigFlags 3\n >>\n>>\n",
UsageRightsSignature: "<<\n /Type /Catalog\n /Version /1.5\n /Outlines 2 0 R\n /Pages 3 0 R\n /AcroForm <<\n /Fields [16 0 R]\n /SigFlags 1\n >>\n>>\n",
ApprovalSignature: "<<\n /Type /Catalog\n /Version /1.5\n /Outlines 2 0 R\n /Pages 3 0 R\n /AcroForm <<\n /Fields [16 0 R]\n /SigFlags 3\n >>\n>>\n",
},
},
}

View File

@@ -20,7 +20,6 @@ func TestGetLastObjectIDFromXref(t *testing.T) {
{"testfile16.pdf", 567},
{"testfile17.pdf", 20},
{"testfile20.pdf", 10},
{"testfile21.pdf", 16},
}
for _, tc := range testCases {

Binary file not shown.