You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tutorial demonstrates how to import an unsigned PDF containing a [signature]({%slug radpdfprocessing-features-digital-signature%}) and sign it using [RadPdfProcessing]({%slug radpdfprocessing-overview%}).
20
+
This tutorial demonstrates how to import an unsigned PDF containing a [signature field]({%slug radpdfprocessing-features-digital-signature%}) and sign it using [RadPdfProcessing]({%slug radpdfprocessing-overview%}).
21
21
22
22

23
23
24
24
## Solution
25
25
To add signatures and images to PDF documents and ensure the signed version correctly overwrites an existing file, follow these steps:
26
26
27
-
1.**Check if the Document is Already Signed**: Before adding a new signature, it's essential to check if the document is already signed. This can be done by iterating through the form fields and checking for signature fields.
27
+
1.**Check if the Document is Already Signed**: Before signing the signature field, it's essential to check if the document is already signed. This can be done by iterating through the form fields and checking for signature fields.
28
28
29
-
2.**Prepare the Document for Signing**: Load the document into a `RadFixedDocument` object using the `PdfFormatProvider.Import` method. If the document already contains a signature field, you will need to access this field to add the signature.
29
+
2.**Prepare the Document for Signing**: Load the document into a `RadFixedDocument` object using the `PdfFormatProvider.Import` method. If the document already contains an empty signature field, you will need to access this field and sign it.
30
30
31
31
3.**Add the Signature**: Use a certificate to sign the document. The `SignatureField.Signature` property allows you to assign a new `Signature` object, which is created using the certificate.
32
32
33
-
4.**Add an Image**: To insert an image, such as a signature graphic, use a `FixedContentEditor` on the desired page and use the `DrawBlock` method. The image can be loaded from a file using a `FileStream` and added to a `Block` object.
33
+
4.**Add an Image**: To insert an image, such as a signature graphic, use a `FixedContentEditor` on the desired **FormSource** and use the `DrawBlock` method. The image can be loaded from a file using a `FileStream` and added to a `Block` object.
34
34
35
35
5.**Export the Signed Document**: Before exporting the signed document, delete the previous version of the file if it exists. This step is crucial to avoid permission issues or structure mismatches in the PDF file. Use the `PdfFormatProvider.Export` method to save the signed document.
36
36
@@ -56,25 +56,25 @@ Below is a sample code snippet demonstrating these steps:
0 commit comments