Class Signer
Process signatures and signature fields
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassEvent for non-critical errors occurring during signature processingstatic interfaceListener interface for theSigner.Warningevent. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPreparedSignature(Document document, SignatureConfiguration configuration, Stream stream) Add a prepared signatureaddPreparedSignature(Document document, SignatureConfiguration configuration, Stream stream, OutputOptions outputOptions) Add a prepared signatureaddSignatureField(Document document, SignatureFieldOptions options, Stream stream) Add an unsigned signature fieldaddSignatureField(Document document, SignatureFieldOptions options, Stream stream, OutputOptions outputOptions) Add an unsigned signature fieldaddTimestamp(Document document, TimestampConfiguration configuration, Stream stream) Add a document time-stampaddTimestamp(Document document, TimestampConfiguration configuration, Stream stream, OutputOptions outputOptions) Add a document time-stampvoidaddWarningListener(Signer.WarningListener listener) Add a listener for theSigner.Warningevent.certify(Document document, SignatureConfiguration configuration, Stream stream) Add a document certification signaturecertify(Document document, SignatureConfiguration configuration, Stream stream, MdpPermissionOptions permissions) Add a document certification signaturecertify(Document document, SignatureConfiguration configuration, Stream stream, MdpPermissionOptions permissions, OutputOptions outputOptions) Add a document certification signatureProcess a documentprocess(Document document, Stream stream, OutputOptions outputOptions) Process a documentprocess(Document document, Stream stream, OutputOptions outputOptions, Provider provider) Process a documentvoidremoveWarningListener(Signer.WarningListener listener) Remove registered listener for theSigner.Warningevent.sign(Document document, SignatureConfiguration configuration, Stream stream) Add a document signaturesign(Document document, SignatureConfiguration configuration, Stream stream, OutputOptions outputOptions) Add a document signaturesignPreparedSignature(Document document, SignatureConfiguration configuration, Stream stream) Sign a prepared signatureMethods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
Constructor Details
-
Signer
public Signer()
-
-
Method Details
-
addWarningListener
Add a listener for theSigner.Warningevent.- Parameters:
listener- Listener for theSigner.Warningevent. If a listener is added that is already registered, it is ignored.
-
removeWarningListener
Remove registered listener for theSigner.Warningevent.- Parameters:
listener- Listener for theSigner.Warningevent that should be removed. If the listener is not registered, it is ignored.
-
sign
public Document sign(Document document, SignatureConfiguration configuration, Stream stream) throws IOException, NotFoundException, LicenseException, UnsupportedFeatureException, PermissionException, HttpException, RetryException Add a document signature
Document signatures are sometimes also called approval signatures. This type of signature lets you verify the integrity of the signed part of the document and authenticate the signer’s identity.
The features and format of the signature are defined by the
pdftools.crypto.providers.Providerand theconfiguration.Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to signconfiguration- The signature configurationstream- The stream where the signed document is written- Returns:
- The signed document
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closed.IllegalArgumentException- If theconfigurationis invalid, e.g. because it has been revoked.NotFoundException- If theSignatureConfiguration.getFieldName()does not exist indocument.NotFoundException- If an image, a PDF or a font file for the visual appearance could not be found.RetryException- If an unexpected error occurs that can be resolved by retrying the operation. For example, if a signature service returns an unexpectedly large signature.RetryException- If a resource required by the cryptographic provider is temporarily unavailable.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL) or a time-stamp.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.PermissionException- If the cryptographic provider does not allow the signing operation.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
sign
public Document sign(Document document, SignatureConfiguration configuration, Stream stream, OutputOptions outputOptions) throws IOException, NotFoundException, LicenseException, UnsupportedFeatureException, PermissionException, HttpException, RetryException Add a document signature
Document signatures are sometimes also called approval signatures. This type of signature lets you verify the integrity of the signed part of the document and authenticate the signer’s identity.
The features and format of the signature are defined by the
pdftools.crypto.providers.Providerand theconfiguration.Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to signconfiguration- The signature configurationstream- The stream where the signed document is writtenoutputOptions- Document-level output options not directly related to the signature- Returns:
- The signed document
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closed.IllegalArgumentException- If theconfigurationis invalid, e.g. because it has been revoked.NotFoundException- If theSignatureConfiguration.getFieldName()does not exist indocument.NotFoundException- If an image, a PDF or a font file for the visual appearance could not be found.RetryException- If an unexpected error occurs that can be resolved by retrying the operation. For example, if a signature service returns an unexpectedly large signature.RetryException- If a resource required by the cryptographic provider is temporarily unavailable.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL) or a time-stamp.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.PermissionException- If the cryptographic provider does not allow the signing operation.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
certify
public Document certify(Document document, SignatureConfiguration configuration, Stream stream) throws IOException, NotFoundException, LicenseException, UnsupportedFeatureException, PermissionException, HttpException, RetryException Add a document certification signature
This type of signature lets you detect rejected changes specified by the author. These signatures are also called Modification Detection and Prevention (MDP) signatures. The allowed permissions are defined by
permissions.The features and format of the signature are defined by the
pdftools.crypto.providers.Providerand theconfiguration.Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to certifyconfiguration- The signature configurationstream- The stream where the certified document is written- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closed.NotFoundException- If theSignatureConfiguration.getFieldName()does not exist indocument.RetryException- If an unexpected error occurs that can be resolved by retrying the operation. For example, if a signature service returns an unexpectedly large signature.RetryException- If a resource required by the cryptographic provider is temporarily unavailable.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL) or a time-stamp.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.PermissionException- If the cryptographic provider does not allow the signing operation.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
certify
public Document certify(Document document, SignatureConfiguration configuration, Stream stream, MdpPermissionOptions permissions) throws IOException, NotFoundException, LicenseException, UnsupportedFeatureException, PermissionException, HttpException, RetryException Add a document certification signature
This type of signature lets you detect rejected changes specified by the author. These signatures are also called Modification Detection and Prevention (MDP) signatures. The allowed permissions are defined by
permissions.The features and format of the signature are defined by the
pdftools.crypto.providers.Providerand theconfiguration.Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to certifyconfiguration- The signature configurationstream- The stream where the certified document is writtenpermissions- The permissions allowed. The default ispdftools.pdf.MdpPermissions.NO_CHANGES.- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closed.NotFoundException- If theSignatureConfiguration.getFieldName()does not exist indocument.RetryException- If an unexpected error occurs that can be resolved by retrying the operation. For example, if a signature service returns an unexpectedly large signature.RetryException- If a resource required by the cryptographic provider is temporarily unavailable.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL) or a time-stamp.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.PermissionException- If the cryptographic provider does not allow the signing operation.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
certify
public Document certify(Document document, SignatureConfiguration configuration, Stream stream, MdpPermissionOptions permissions, OutputOptions outputOptions) throws IOException, NotFoundException, LicenseException, UnsupportedFeatureException, PermissionException, HttpException, RetryException Add a document certification signature
This type of signature lets you detect rejected changes specified by the author. These signatures are also called Modification Detection and Prevention (MDP) signatures. The allowed permissions are defined by
permissions.The features and format of the signature are defined by the
pdftools.crypto.providers.Providerand theconfiguration.Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to certifyconfiguration- The signature configurationstream- The stream where the certified document is writtenpermissions- The permissions allowed. The default ispdftools.pdf.MdpPermissions.NO_CHANGES.outputOptions- Document-level output options not directly related to the document certification- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closed.NotFoundException- If theSignatureConfiguration.getFieldName()does not exist indocument.RetryException- If an unexpected error occurs that can be resolved by retrying the operation. For example, if a signature service returns an unexpectedly large signature.RetryException- If a resource required by the cryptographic provider is temporarily unavailable.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL) or a time-stamp.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.PermissionException- If the cryptographic provider does not allow the signing operation.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
addTimestamp
public Document addTimestamp(Document document, TimestampConfiguration configuration, Stream stream) throws IOException, NotFoundException, LicenseException, UnsupportedFeatureException, PermissionException, HttpException, RetryException Add a document time-stamp
This type of signature provides evidence that the document existed at a specific time and protects the document’s integrity.
The features and format of the signature are defined by the
pdftools.crypto.providers.Providerand theconfiguration.Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to add a time-stamp toconfiguration- The time-stamp configurationstream- The stream where the output document is written- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closed.NotFoundException- If theSignatureConfiguration.getFieldName()does not exist indocument.RetryException- If an unexpected error occurs that can be resolved by retrying the operation. For example, if a signature service returns an unexpectedly large signature.RetryException- If a resource required by the cryptographic provider is temporarily unavailable.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL) or a time-stamp.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.PermissionException- If the cryptographic provider does not allow the signing operation.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
addTimestamp
public Document addTimestamp(Document document, TimestampConfiguration configuration, Stream stream, OutputOptions outputOptions) throws IOException, NotFoundException, LicenseException, UnsupportedFeatureException, PermissionException, HttpException, RetryException Add a document time-stamp
This type of signature provides evidence that the document existed at a specific time and protects the document’s integrity.
The features and format of the signature are defined by the
pdftools.crypto.providers.Providerand theconfiguration.Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to add a time-stamp toconfiguration- The time-stamp configurationstream- The stream where the output document is writtenoutputOptions- Document-level output options not directly related to the document time-stamp- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closed.NotFoundException- If theSignatureConfiguration.getFieldName()does not exist indocument.RetryException- If an unexpected error occurs that can be resolved by retrying the operation. For example, if a signature service returns an unexpectedly large signature.RetryException- If a resource required by the cryptographic provider is temporarily unavailable.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL) or a time-stamp.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.PermissionException- If the cryptographic provider does not allow the signing operation.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
addSignatureField
public Document addSignatureField(Document document, SignatureFieldOptions options, Stream stream) throws IOException, LicenseException, UnsupportedFeatureException, ExistsException Add an unsigned signature field
Add an unsigned signature field that can later be signed (see
pdftools.pdf.UnsignedSignatureField).Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to add the signature field tooptions- The options for the unsigned signature fieldstream- The stream where the output document is written- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.ExistsException- TheSignatureFieldOptions.getFieldName()exists already in the input document.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifoptionsisnullIllegalArgumentException- ifstreamisnull
-
addSignatureField
public Document addSignatureField(Document document, SignatureFieldOptions options, Stream stream, OutputOptions outputOptions) throws IOException, LicenseException, UnsupportedFeatureException, ExistsException Add an unsigned signature field
Add an unsigned signature field that can later be signed (see
pdftools.pdf.UnsignedSignatureField).Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to add the signature field tooptions- The options for the unsigned signature fieldstream- The stream where the output document is writtenoutputOptions- Document-level output options not directly related to the signature field- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.ExistsException- TheSignatureFieldOptions.getFieldName()exists already in the input document.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifoptionsisnullIllegalArgumentException- ifstreamisnull
-
addPreparedSignature
public PreparedDocument addPreparedSignature(Document document, SignatureConfiguration configuration, Stream stream) throws IOException, NotFoundException, LicenseException, UnsupportedFeatureException, HttpException Add a prepared signature
Adding a prepared signature is only required in very particular or specialized use cases. This method is the same as
sign(com.pdftools.pdf.Document, com.pdftools.sign.SignatureConfiguration, com.pdftools.sys.Stream), but without actually creating the cryptographic signature. The cryptographic signature can be inserted later usingsignPreparedSignature(com.pdftools.pdf.Document, com.pdftools.sign.SignatureConfiguration, com.pdftools.sys.Stream).While the
configurationcan be created by anypdftools.crypto.providers.Provider, it is typically created bypdftools.crypto.providers.builtin.Provider.createPreparedSignature.- Parameters:
document- The input document to add the prepared signatureconfiguration- The signature configurationstream- The stream where the output document is written- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closedNotFoundException- If theSignatureConfiguration.getFieldName()does not exist indocument.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL).IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
addPreparedSignature
public PreparedDocument addPreparedSignature(Document document, SignatureConfiguration configuration, Stream stream, OutputOptions outputOptions) throws IOException, NotFoundException, LicenseException, UnsupportedFeatureException, HttpException Add a prepared signature
Adding a prepared signature is only required in very particular or specialized use cases. This method is the same as
sign(com.pdftools.pdf.Document, com.pdftools.sign.SignatureConfiguration, com.pdftools.sys.Stream), but without actually creating the cryptographic signature. The cryptographic signature can be inserted later usingsignPreparedSignature(com.pdftools.pdf.Document, com.pdftools.sign.SignatureConfiguration, com.pdftools.sys.Stream).While the
configurationcan be created by anypdftools.crypto.providers.Provider, it is typically created bypdftools.crypto.providers.builtin.Provider.createPreparedSignature.- Parameters:
document- The input document to add the prepared signatureconfiguration- The signature configurationstream- The stream where the output document is writtenoutputOptions- Document-level output options not directly related to preparing the signature- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closedNotFoundException- If theSignatureConfiguration.getFieldName()does not exist indocument.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL).IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
signPreparedSignature
public Document signPreparedSignature(Document document, SignatureConfiguration configuration, Stream stream) throws IOException, LicenseException, UnsupportedFeatureException, PermissionException, HttpException, RetryException Sign a prepared signature
Sign a document that contains a prepared signature created usingaddPreparedSignature(com.pdftools.pdf.Document, com.pdftools.sign.SignatureConfiguration, com.pdftools.sys.Stream). Note that theconfigurationmust be compatible to the configuration used when preparing the signature.- Parameters:
document- The input document to signconfiguration- The signature configurationstream- The stream where the signed document is written- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.IllegalArgumentException- If thedocumentdoes not contain a prepared signature created byaddPreparedSignature(com.pdftools.pdf.Document, com.pdftools.sign.SignatureConfiguration, com.pdftools.sys.Stream)IllegalArgumentException- If theconfigurationis invalid, e.g. because the creating provider has been closed.RetryException- If an unexpected error occurs that can be resolved by retrying the operation. For example, if a signature service returns an unexpectedly large signature.RetryException- If a resource required by the cryptographic provider is temporarily unavailable.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL) or a time-stamp.UnsupportedFeatureException- If the cryptographic provider does not support the requested signing algorithm.PermissionException- If the cryptographic provider does not allow the signing operation.IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifconfigurationisnullIllegalArgumentException- ifstreamisnull
-
process
public Document process(Document document, Stream stream) throws IOException, LicenseException, UnsupportedFeatureException, HttpException Process a document
Apply document-level processing options without any signature operation. For example:
- To encrypt or decrypt PDF documents that may be signed (see the samples "Encrypt" and "Decrypt").
-
To remove signatures and unsigned signature fields (see
OutputOptions.getRemoveSignatures()). -
To add validation information to existing signatures (see
OutputOptions.getAddValidationInformation()).
Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to processstream- The stream where the output document is written- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL).IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifstreamisnull
-
process
public Document process(Document document, Stream stream, OutputOptions outputOptions) throws IOException, LicenseException, UnsupportedFeatureException, HttpException Process a document
Apply document-level processing options without any signature operation. For example:
- To encrypt or decrypt PDF documents that may be signed (see the samples "Encrypt" and "Decrypt").
-
To remove signatures and unsigned signature fields (see
OutputOptions.getRemoveSignatures()). -
To add validation information to existing signatures (see
OutputOptions.getAddValidationInformation()).
Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to processstream- The stream where the output document is writtenoutputOptions- The document-level processing options- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL).IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifstreamisnull
-
process
public Document process(Document document, Stream stream, OutputOptions outputOptions, Provider provider) throws IOException, LicenseException, UnsupportedFeatureException, HttpException Process a document
Apply document-level processing options without any signature operation. For example:
- To encrypt or decrypt PDF documents that may be signed (see the samples "Encrypt" and "Decrypt").
-
To remove signatures and unsigned signature fields (see
OutputOptions.getRemoveSignatures()). -
To add validation information to existing signatures (see
OutputOptions.getAddValidationInformation()).
Non-critical processing errors raise a
Signer.WarningListener. It is recommended to review theWarningCategoryand handle them if necessary for the application.- Parameters:
document- The input document to processstream- The stream where the output document is writtenoutputOptions- The document-level processing optionsprovider- The cryptographic provider to use to add validation information to existing signatures of input document (seeOutputOptions.getAddValidationInformation()). Can benullif no validation information is added or to use the default provider.- Returns:
- Throws:
LicenseException- The license check has failed.IOException- Writing to thestreamfailed.UnsupportedFeatureException- The input PDF contains unrendered XFA form fields. Seepdftools.pdf.Document.getXfafor more information on how to detect and handle XFA documents.HttpException- If a network error occurs, e.g. downloading revocation information (OCSP, CRL).IllegalArgumentException- ifdocumentisnullIllegalArgumentException- ifstreamisnull
-