On Tue, 2016-08-02 at 14:04 +0000, Thomas Szendefi wrote: > For being able to sign a PDF using its existing signature field, I > added this constructor to PdfSignatureField.cpp: > > 60c60,71 > < void PdfSignatureField::SetAppearanceStream( PdfXObject* pObject ) > --- > > PdfSignatureField::PdfSignatureField( const PdfField & rhs ) > > : PdfField( rhs ) > > { > > if( this->GetType() != ePdfField_Signature ) > > { > > PODOFO_RAISE_ERROR_INFO( ePdfError_InvalidDataType, "Field > cannot be converted into a PdfSignatureField" ); > > } > > m_pSignatureObj = NULL; > > Init(); > > }
Hello, first of all, patches are better unified (thus they contain some context, where I prefer `diff -up ...` personally) and attached. See how it is garbled above. Why do you need to edit an existing field? It looks wrong, because you are altering existing PDF file content "in the middle", which breaks everything. The right thing is to do an incremental update, which PoDoFo supports for digital signatures, even it's not trivial to do it. See PdfSignInc*.cpp/.h files and structures in the base/ and doc/ directories. I guess it answered both your questions/parts. Bye, zyx ------------------------------------------------------------------------------ _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users