CreateVisibleSignature2 does not add a visible signature to a given PDF anymore (e.g. when using the file "minimum.pdf" attached to issue 5068 https://issues.apache.org/jira/browse/PDFBOX-5068 )
The reason can be found in commit 45f11130 (
PDFBOX-5170: preserve the information whether a parsed COSDicionary is direct or not so that COSWriter can take this into account when saving the pdf Andreas Lehmkühler 05.06.21, 13:46).
When commenting/removing line 206 in BaseParser::parseCOSDictionary
it is working again.
I checked it also with other PDFs.