SignDoc SDK (Java)  5.0.0
Migrating from SignDoc SDK 3.x to SignDoc SDK 4.0

This section lists the API changes between version 3.x and version 4.0 of SignDoc SDK and how to change your application to work with the new API.

SPSignDoc_4.0.dll has been built with Microsoft Visual Studio 2008 only. Thanks to the new C API and C++ wrapper in SignDocSDK-cpp.h, that DLL should work with all C++ compilers.

PDFNet is no longer used, you don't have to deploy the PDFNet DLL.

Some operations now fail if they would invalidate existing signatures or make a document which claims to be a PDF/A document no longer conform to PDF/A. If you want to perform those operations anyway, you can unsign signature fields with de.softpro.doc.SignDocDocument.clearAllSignatures(), remove signatures granting permissions with de.softpro.doc.SignDocDocument.removePermissions(), and turn a PDF/A document into a plain PDF document with de.softpro.doc.SignDocDocument.removePDFA(). See also de.softpro.doc.SignDocDocument.setShootInFoot()

Attempts to sign with a certificate that is not yet valid or no longer valid or which is not qualified for digital signatures now fail. See also de.softpro.doc.SignDocDocument.setShootInFoot().

Using a TrueType font without embedding it is no longer allowed. See also de.softpro.doc.SignDocDocument.setShootInFoot(). The default value of the "embed" attribute of the FontFiles element has been changed from "no" to "subset".

Classes SignDocGrayColor and SignDocRGBColor have been removed, all types of color are now represented by class de.softpro.doc.SignDocColor. Use the static factory methods of class de.softpro.doc.SignDocColor to create SignDocColor objects.

de.softpro.doc.SignDocDocumentLoader.registerDocumentHandlerLibrary() has been removed.

de.softpro.doc.SignDocProperty.setName() and de.softpro.doc.SignDocProperty.setType() have been removed.

vm_windows of de.softpro.doc.SignDocRenderParameters and de.softpro.doc.SignDocVerificationResult has been renamed vm_default.

Class TimeStampClient has been replaced by class de.softpro.doc.TimeStamper and is now implemented.

Function de.softpro.doc.SignDocField.isSigned() has been added. If you just need to know whether a field is signed or not, this function will be much more efficient than de.softpro.doc.SignDocDocument.verifySignature().

de.softpro.doc.SignDocDocument.setField() no longer moves or resizes fields. To force de.softpro.doc.SignDocDocument.setField() to move or resize a field, pass the de.softpro.doc.SignDocDocument.sff_move flag.

de.softpro.doc.SignDocDocument.flattenFields() now ignores signatures fields and hidden/invisible widgets; this behavior can be changed by passing appropriate flags.

de.softpro.doc.SignDocDocument.saveToFile() now can save to a new file (that is, a pathname can be passed in aPath) even if de.softpro.doc.SignDocDocument.sf_incremental is set in aFlags. de.softpro.doc.SignDocDocument.sf_incremental can also be used if the document was loaded from memory. de.softpro.doc.SignDocDocument.saveToStream() now supports de.softpro.doc.SignDocDocument.sf_incremental.

de.softpro.doc.SignDocDocument.copyToStream() now has a new argument, aFlags. Pass de.softpro.doc.SignDocDocument.ctsf_unsaved to include unsaved changes without actually saving the document.

Function de.softpro.doc.SignDocSignatureParameters.clearTextItems() has been added.

Using string parameter "OutputPath" for signing a PDF document that already contains signatures no longer break existing signatures.

A PDF document loaded from memory (or saved to a stream) can now be signed without saving to a file (ie, without setting string parameter "OutputPath"). Use de.softpro.doc.SignDocDocument.copyToStream() with 0 for aFlags to save the document after signing in that case.

By using the special value "<memory>" for string parameter "OutputPath", a PDF document loaded from a file can be signed in memory, ie, without writing to that file.

de.softpro.doc.SignDocSignatureParameters has a new string parameter, "FontName", and a new color parameter, "TextColor". They can be used to override the signature field's text field attributes or to provide a font and a color in the absence of text field attributes.

Attempts to sign a PDF document which already has signatures will fail if integer parameter "Optimize" is set to de.softpro.doc.SignDocSignatureParameters.o_optimize.

de.softpro.doc.SignDocField.getEmptyFieldColor() now returns a de.softpro.doc.SignDocColor rather than a SignDocRGBColor.

SpoocInputStream has been renamed de.softpro.doc.JavaInputStream.

SignPKCS7Source has been renamed de.softpro.doc.Source.

aPathname of de.softpro.doc.SignDocDocumentLoader.initLogging() must now be the pathname of a file; passing the pathname of a directory no longer works. Both aLevel and aPathname must now be non-null The function will throw an exception if the file cannot be opened. On the plus side, the function now can be called at any time. To set the SPDEBUG and SPDEBUGDIR environment variables (which is what initLogging() did in SignDoc SDK 3.x), pass true for aSetEnv.

de.softpro.doc.SignDocException is now derived from java.lang.RuntimeException rather than from java.lang.Exception.