Merge pull request #817 from stephanstapel/master

Added ZUGFeRD.PDF-csharp to list of valid PDF creators
This commit is contained in:
Jochen Staerk
2025-05-14 08:47:51 +02:00
committed by GitHub

View File

@@ -268,6 +268,7 @@ public class PDFValidator extends Validator {
final byte[] ghostscriptSignature = "%%Invocation:".getBytes(StandardCharsets.UTF_8);
final byte[] cibpdfbrewerSignature = "CIB pdf brewer".getBytes(StandardCharsets.UTF_8);
final byte[] lexofficeSignature = "lexoffice".getBytes(StandardCharsets.UTF_8);
final byte[] s2IndustriesSignature = "s2industries.ZUGFeRD.PDF".getBytes(StandardCharsets.UTF_8); // https://github.com/stephanstapel/ZUGFeRD-csharp
if (ByteArraySearcher.contains(fileContents, symtraxSignature)) {
Signature = "Symtrax";
@@ -287,6 +288,8 @@ public class PDFValidator extends Validator {
Signature = "CIB pdf brewer";
} else if (ByteArraySearcher.contains(fileContents, lexofficeSignature)) {
Signature = "Lexware office";
} else if (ByteArraySearcher.contains(fileContents, s2IndustriesSignature)) {
Signature = "ZUGFeRD.PDF-csharp";
}
context.setSignature(Signature);