8

PDF Digital Signatures: Signature Appearance in C#

 9 months ago
source link: https://www.textcontrol.com/blog/2023/12/19/pdf-digital-signatures-signature-appearance-in-csharp/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Signature Appearance in C#

The signature fields can be used with any image or signature representation, including the SVGs returned by the Document Viewer. The example discussed in this article shows how to create a custom signature appearance by adding custom text to an existing SVG signature representation.

Creating Custom Signatures

Let's take a look at how to use the SignatureBoxManager class and what the resulting signature box looks like. The following code adds a new signature box at the bottom left of page 1 of the current document loaded in a Text control object.

When this PDF document is opened in Acrobat Reader, the customized signature is displayed on the document.

Created signature field

The following code generates a smaller signature box that is displayed in the upper-right corner of a document, with the additional information displayed in a different font.

Created signature field

SignatureBoxManager Class

The code below shows the SignatureBoxManager class, which takes an existing SVG signature and embeds it into another SVG with additional custom data like signer name, date, and location.

The class calculates the location of the signature field, the image ratio to scale the signature representation, and adds the additional text to the generated SVG.

The appearance of the created signature can be customized by specifying a font, date format, and options for whether or not to display certain information.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK