Skip to content

Commit c7b73e1

Browse files
authored
Merge pull request #817 from stephanstapel/master
Added ZUGFeRD.PDF-csharp to list of valid PDF creators
2 parents c9123c2 + fe6c64a commit c7b73e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

validator/src/main/java/org/mustangproject/validator/PDFValidator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ public void validate() throws IrrecoverableValidationError {
267267
final byte[] pdfMachineSignature = "pdfMachine from Broadgun Software".getBytes(StandardCharsets.UTF_8);
268268
final byte[] ghostscriptSignature = "%%Invocation:".getBytes(StandardCharsets.UTF_8);
269269
final byte[] cibpdfbrewerSignature = "CIB pdf brewer".getBytes(StandardCharsets.UTF_8);
270-
final byte[] lexofficeSignature = "lexoffice".getBytes(StandardCharsets.UTF_8);
270+
final byte[] lexofficeSignature = "lexoffice".getBytes(StandardCharsets.UTF_8);
271+
final byte[] s2IndustriesSignature = "s2industries.ZUGFeRD.PDF".getBytes(StandardCharsets.UTF_8); // https://github.com/stephanstapel/ZUGFeRD-csharp
271272

272273
if (ByteArraySearcher.contains(fileContents, symtraxSignature)) {
273274
Signature = "Symtrax";
@@ -287,6 +288,8 @@ public void validate() throws IrrecoverableValidationError {
287288
Signature = "CIB pdf brewer";
288289
} else if (ByteArraySearcher.contains(fileContents, lexofficeSignature)) {
289290
Signature = "Lexware office";
291+
} else if (ByteArraySearcher.contains(fileContents, s2IndustriesSignature)) {
292+
Signature = "ZUGFeRD.PDF-csharp";
290293
}
291294

292295
context.setSignature(Signature);

0 commit comments

Comments
 (0)