Hi Thomas,

1.
I didn't get any feedback whether my change was OK - I'll assume it is.

2.
I just did another thing, I moved COSFilterInputStream to org.apache.pdfbox.pdmodel.interactive.digitalsignature, as it is only used there, and because SonarQube complains about a package cycle. I doubt this class is to be used by the public (there's no javadoc), so I've made it package-non public. If this isn't OK, please protest ASAP.

3.
In PDDocument.prepareNonVisibleSignature() there is this line:

apsStream.createUnfilteredStream();

was the purpose to create an empty stream? I'm asking because the stream isn't closed, so this might lead to unintended effects if you do mass signing.


Tilman


Am 20.04.2015 um 13:00 schrieb Thomas Chojecki:
Hi Tilman,
I tried yesterday to understand why there was the need for a VisualSignatureParser and there is no one. I've ran several visual signature tests today and it make no differents between the VisualSignatureParser and the PDFParser. So this part can be replaced refactored.

Did you want to fix this?

Best regards
Thomas

PS: In the other mail you said that there are some getItem() calls instead of getDictionaryObject() calls. I think I didn't know it better 6 years ago, so I've used getItem(). So this can be also fixed. Also the twice call can be removed.

And yes the code is some kind of messy at some points and need to be cleaned up. I planed some time ago to refactor the code but it would make sense to refactor the COSWriter first. For signatures / real incremental updates a List / Set based writer would be a better solution. The recursive parser has to many restrictions so there is some kind of hacking in the signature implementations that does not make sense.


Zitat von Tilman Hausherr <[email protected]>:

Hi Thomas,

Why is the VisualSignatureParser needed, i.e. why can't we just use the COSParser (and maybe add a method setVisualSignature(File pdf))? My question is related to the question "parseCOSStream defined twice" by Andrea Vacondio. There are two calls of the sequential version; the one in PDFStreamParser I will remove soon because streams don't exist in content streams, the other one is in VisualSignatureParser.

Tilman



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to