You have an electronically signed PDF document, and you want to remove e-signatures to reuse it as a clean simple document or resign with your signatures. As a Python developer, you can easily remove signatures from your signed PDF documents programmatically on the cloud. This article will be focusing on how to remove signatures from signed PDF documents using a REST API in Python.
The following topics shall be covered in this article:
Document Signature REST API and Python SDK
I will be using the Python SDK of GroupDocs.Signature Cloud API to remove signatures from PDF documents. It enables you to create, verify and search different types of signatures in portable or simple documents, spreadsheets, presentations, and images. It also provides .NET, Java, PHP, Android, Ruby, and Node.js SDKs as its document signature family members for the Cloud API.
You can install GroupDocs.Signature Cloud to your Python project using the following command in the console:
pip install groupdocs_signature_cloud
Please get your Client ID and Client Secret from the dashboard before you start following the steps and available code examples. Once you have your ID and secret, add in the code as demonstrated below:
Remove Signatures from PDF Documents using a REST API in Python
You can remove signatures from signed PDF documents by following the simple steps mentioned below:
- Upload the signed PDF file to the Cloud
- Remove Signatures from Signed PDF Document using Python
- Download the resultant file
Upload the Document
Firstly, upload the signed PDF document to the Cloud using the code example given below:
As a result, the uploaded PDF file will be available in the files section of your dashboard on the cloud.
Remove Signatures from Signed PDF Documents using Python
You can remove the signatures from a signed PDF file programmatically by following the steps mentioned below.
- Create an instance of SignApi
- Set path to the signed PDF file
- Search Barcode
- Define SearchBarcodeOptions and SearchSettings
- Create SearchSignaturesRequest
- Get results by calling the SignApi.search_signatures() method
- Delete the searched Barcode
- Define DeleteOptions and DeleteSettings
- Create DeleteSignatureRequest
- Get results by calling the SignApi.delete_signatures() method
The following code example shows how to remove Barcode signatures from a signed PDF document using a REST API.
Download the Updated File
The above code sample will save the updated PDF file on the cloud which can be downloaded using the following code sample:
Please try the following free online PDF signature tool, which is developed using the above API. https://products.groupdocs.app/signature/pdf
In this article, you have learned how to remove signatures from signed PDF documents on the cloud. This article also explained how to programmatically upload a PDF file on the cloud and then download the updated file from the cloud. You can learn more about GroupDocs.Signature Cloud API using the documentation. We also provide an API Reference section that lets you visualize and interact with our APIs directly through the browser. In case of any ambiguity, please feel free to contact us on the forum.