On Sat, 2002-07-20 at 16:55, Miguel A Paraz wrote: > Hi, > I've been reading the code and I hope to get some tips. > > On Wed, Jul 17, 2002 at 02:58:13PM +0200, Keiron Liddle wrote: > > If I understand it properly you would need to add an Encrypt pdf object > > that is referenced in the documents trailer dictionary. > > That is, write out the signature with PDFDocument.outputTrailer? > Or, add it to trailerObjects using addTrailerObject?
Add a new object to the pdf file that is referenced in the trailer dictionary using the pdf object reference. > > The you would need to encrypt all pdf streams using the appropriate > > algorithm. If JCE can handle this then it would be used to encrypt the > > stream. > > Thus I will subclass PDFFilter. > > >From my reading of the code, the scope of the PDFFilter is only inside > the PDFStream, and the document is composed of multiple PDFStreams. > > If I am correct, then the signing process has to be closer to the output > level. For instance, using a FilterOutputStream to peek at the data being > written out at the PDFRenderer level. Or, I could use a single > java.security.Signature instance for all the PDFFilter subclass instances. > > If I am wrong, and I can use a PDFFilter subclass, how can I extract my > java.security.Signature instance from the PDFFilter, to write it out > (java.security.Signature.sign())? The filters in PDFStream are not > referenced by name. As I misunderstood the original question it appears there is a slight difference to what needs to be done. What exactly does it need to do to sign a pdf file. Does it need to read all data in all streams and then create a single signature number. If so then it sounds like there needs to be some adjustment to how the filters are created and used in order to accomodate what you want. > > - organise the configuration for password etc. > > If a PDFFilter subclass is to be used, how can this have access to the > configuration file? I don't know. What do you think it should do? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]