フッターコンテンツにスキップ
IRONSECUREDOCを使用する

PDF署名サーバー(開発者向けチュートリアル)

Digital signatures are among the cryptographic techniques that ensure digital documents' source, integrity, and non-replication. In most cases, it is rather quite different from conventional forms of handwritten signatures where advanced encryption techniques secure the document and verify the identity of the signer. Applied to a PDF, a digital signature creates an electronic "seal," which looks like a certificate identifying a document as unaltered since it was signed. This seal details an encryption system bearing a mathematical algorithm that encodes signature data onto the document. Digital signatures allow for an immutable log of changes to be kept with the document, besides identifying the signing party. In this article, we are going to create a PDF Signer server with the help of IronSecureDoc.

How to Use the PDF Signer Server

  1. Install the IronSecureDoc docker image.
  2. Run the docker image with a specific port and license key.
  3. Initialize IronSecureDoc Client with a .NET application.
  4. Get the URL and pass it into the IronSecureDoc Client while creating the object.
  5. Pass the required parameter into the IronSecureDoc Client API.
  6. Get the processed PDF documents and save them into the location.

What is IronSecureDoc?

IronSoftware's IronSecureDoc is the omnipotent solution for document security. This would protect against leakage of sensitive information through various formats of documents. It supports state-of-the-art encryption methods to secure documents from unauthorized access so that only readers or editors designated have the mandate to view or modify them. It also supports digital signatures, identifying a document maker as authorized and ensuring that its content is not tampered with since signing.

IronSecureDoc

Besides, it provides secure document sharing and maintenance with control over how they are circulated and whom it is shared with. IronSecureDoc embeds these features to help organizations and individuals maintain compliance with data protection and prevent data breaches. The relevance of this very user-friendly interface, with a set of security features, makes it very relevant software to any business willing to offer a higher level of security when sharing documents.

Features of IronSecureDoc

IronSecureDoc is provided with a plethora of features to enhance the security of the documents and keep them intact. Some of its key features include:

Advanced Encryption: This feature helps to protect documents against unauthorized eyeballs, therefore securing information secrecy through tough and strong algorithms of encryption.

Digital Signatures: This property testifies to the fact that digital signatures may be attached to any document for assertions that it is original and not altered since signing, but also who has signed it.

Safe Sharing: Share documents safely and specify persons authorized to view and even engage with them. It detects unauthorized changes or tampering to a document and therefore helps safeguard the integrity of the document.

Compliance: This brings organizations into compliance with numerous regulations on protection and industry standards by assuring the safe handling and transmission of documents.

Ease of Use: It provides easy access through its user-friendly interface in handling security features and document settings.

Audit Trails: It creates trails of history for access and modification, hence allowing transparency and accountability.

Install IronSecureDoc Docker Image

Installing and running an IronSecureDoc Docker image is easy. Here's how you might do it:

Install Docker

First of all, make sure Docker is installed on your system. You can download Docker from Docker's official website and follow the installation instructions there for your operating system.

Pull the IronSecureDoc Docker Image

Open a terminal or a Command Prompt and execute this command to pull the IronSecureDoc Docker image from the repository.

docker pull ironsoftwareofficial/ironsecuredoc
docker pull ironsoftwareofficial/ironsecuredoc
SHELL

Run the Docker Container

After the image has been pulled, the below command should start a new container. You can customize the -p flag for port mapping or the --rm used to remove one or more running Docker containers from the Docker host.

docker container run --rm -p 8080:8080 -e IronSecureDoc_LicenseKey=<IRONSECUREDOC_LICENSE_KEY> -e ENVIRONMENT=Development -e HTTP_PORTS=8080 ironsoftwareofficial/ironsecuredoc:latest
docker container run --rm -p 8080:8080 -e IronSecureDoc_LicenseKey=<IRONSECUREDOC_LICENSE_KEY> -e ENVIRONMENT=Development -e HTTP_PORTS=8080 ironsoftwareofficial/ironsecuredoc:latest
SHELL

In the example above, map the host's port 8080 to the container's and assign a name to the created container in IronSecureDoc. Once the command is executed, it will display as below.

Run Docker Container

Once they start to run, you can access the list of APIs provided by the IronSecureDoc through the browser (http://localhost:8080/swagger/index.html) or any application connectivity.

Swagger

Create a New Visual Studio Project

Visual Studio makes it very widely and easily possible to develop console projects. Below are a few simple steps to help you get started on a Console Application in the environment of Visual Studio.

Before you can use Visual Studio, be sure you have installed it on your computer.

Start a New Project:

After choosing File, Project, select the New menu.

Console App

Please select "Console App" or "Console App (.NET Core)" from the list of available project template references below.

To give your project a name, fill out the "Name" field.

Project Configuration

Select the location for your project.

Click "Create" to open the Console Application project.

Target Framework

What is IronSoftware.SecureDoc.Client?

IronSoftware.SecureDoc.Client Library is easy integration into your existing .NET applications to leverage what IronSecureDoc has to offer in PDF encryption, redaction, and digital signing through easy REST API calls. Developers can easily secure documents in their applications with integrity guaranteed using IronSoftware.SecureDoc.Client library, all operations are kept on-site for high protection of data. Whether it be for redacting sensitive information, certifying document signing, or enforcing document encryption, IronSoftware.SecureDoc.Client has the tools to do all these tasks efficiently and securely.

Install IronSoftware.SecureDoc.Client

First, run the installation of the IronSoftware.SecureDoc.Client library since the upcoming patch depends on it. Finally, to complete this, open the NuGet Package Manager Console and execute the following command:

Install-Package IronSoftware.SecureDoc.Client

Install IronSoftware.SecureDoc.Client

You can also search for the package "IronSoftware.SecureDoc.Client" in the NuGet Package Manager. Choose from the list of all NuGet packages related to IronSoftware.SecureDoc.Client which one has to be downloaded.

NuGet Package Manager

Create a self-signed digital ID

Sensitive business transactions typically will ask for an ID from a certificate authority, not a self-signed one.

In Adobe Acrobat, click the hamburger menu (Windows) or Acrobat menu (macOS), then select Preferences.

Adobe Acrobat

In the left-hand Categories list, select Signatures. On the right, click More next to Identities & Trusted Certificates.

Signatures

On the left, select Digital IDs, then click the Add ID button.

Add ID

Add a new digital ID

Now select the radio button option "A new digital ID I want to create now" and then click Next.

New Digital ID

Create a new digital ID

Point where to save the digital ID and then click Next.

Save Digital ID

New PKCS#12 Digital ID File

Save Digital ID information in a .pfx file in Windows and .p12 in macOS. You can transport these files across operating systems and use them with Acrobat. If you copy a document to another operating system, Acrobat will continue using it.

Save the digital ID to a common store where other Windows applications can also access it.

Add Digital ID

PKCS-digital-id

In the field for your digital ID, type your name, email address, and other personal information; this is what will display inside the Signature box and inside the Signatures panel when you Sign or Certify a document.

Do the following: Select an item from the Key Algorithm drop-down list. From a security standpoint, a 2048-bit RSA is more secure than a 1024-bit RSA. But 1024-bit RSA is more compatible with more devices.

In the Use digital ID For menu, you can specify whether to use the digital ID for either Encryption, Digital Signature, or both.

Click Next.

Save Digital ID

Enter your identity information

Type a password for the digital ID file. As you type, the password strength meter assesses your password and displays the password strength with color patterns. Confirm your password.

The default location indicated in the File Name box will be where the digital ID file is kept. Click Browse and choose a different place to save to. Select "Finish."

Enter a password for your ID.

If a digital ID file shares the same name, you will be asked to replace it. Click OK to replace, or click Browse and select a different location to store the file.

Now an ID has been created. You can export the certificate file to send to contacts so they can use it in order to verify your signature.

Trusted Certificate

Sign a PDF Document with IronSecureDoc

Below is the sample code that will help us digitally sign the PDF document with the certificate file.

using IronSecureDoc;

Console.WriteLine("File Process started");

// Initialize the IronSecureDocClient with the URL of the locally hosted service
var client = new IronSecureDocClient("http://localhost:8080");

// Asynchronously attempt to connect to the IronSecureDoc service
if (await client.TryConnectAsync())
{
    // If connection is successful, certify the PDF document using the provided certificate
    var result = await client.CertifyAsync("Demo.pdf", "DemoSign.pfx", "Your certificate password here");

    // Save the signed PDF document to a new file
    File.WriteAllBytes("certify.pdf", result);
}

Console.WriteLine("File Process completed");

// Wait for user input before closing the console window, allowing the user to see the completion message
Console.ReadKey();
using IronSecureDoc;

Console.WriteLine("File Process started");

// Initialize the IronSecureDocClient with the URL of the locally hosted service
var client = new IronSecureDocClient("http://localhost:8080");

// Asynchronously attempt to connect to the IronSecureDoc service
if (await client.TryConnectAsync())
{
    // If connection is successful, certify the PDF document using the provided certificate
    var result = await client.CertifyAsync("Demo.pdf", "DemoSign.pfx", "Your certificate password here");

    // Save the signed PDF document to a new file
    File.WriteAllBytes("certify.pdf", result);
}

Console.WriteLine("File Process completed");

// Wait for user input before closing the console window, allowing the user to see the completion message
Console.ReadKey();
Imports IronSecureDoc

Console.WriteLine("File Process started")

' Initialize the IronSecureDocClient with the URL of the locally hosted service
Dim client = New IronSecureDocClient("http://localhost:8080")

' Asynchronously attempt to connect to the IronSecureDoc service
If Await client.TryConnectAsync() Then
	' If connection is successful, certify the PDF document using the provided certificate
	Dim result = Await client.CertifyAsync("Demo.pdf", "DemoSign.pfx", "Your certificate password here")

	' Save the signed PDF document to a new file
	File.WriteAllBytes("certify.pdf", result)
End If

Console.WriteLine("File Process completed")

' Wait for user input before closing the console window, allowing the user to see the completion message
Console.ReadKey()
$vbLabelText   $csharpLabel

The following code will first send a message to the console stating that it has begun processing files. Confirmed after that will be the creation of an IronSecureDocClient using the URL for a locally hosted IronSecureDoc service. Below is the sample PDF file.

PDF Input

This function will next proceed to asynchronously attempt to connect to the service. Assuming everything connects properly, it will call CertifyAsync to actually sign the PDF document, passing the paths of the PDF file, the PDF signature certificate file, and the certificate password. The results of that represented as a byte array of the signed PDF, will then be saved in a new file called certify.pdf.

Console Output

This finally prints in the console that the file actually has been processed successfully, then it waits for the user's input before it closes the Console window. This holds up a console window to show the completion message to the user before the application exits.

PDF Output

In the above processed file, the PDF document has been signed by the digital certificate.

Conclusion

IronSecureDoc is an integrated digital document security solution that ensures the tightest level of protection due to robust encryption and certification abilities. The IronSecureDoc client library allows users to easily add a digital signature to their documents for integrity and security standards. It has a simple API, making it easier to protect sensitive information inside documents.

Thus, it's helpful for developers who want to provide advanced protection of documents in their web server applications. Be it for legal, financial, or even business purposes, IronSecureDoc is there to help by providing appropriate tools for data protection, authentication, and end-to-end tamper-evidence across documents' entire lifecycle. IronSecureDoc offers a free trial. To know more about the pricing, refer to the pricing page. Iron Software has a multiplicity of libraries, hence making the development of applications for many platforms and operating systems easier, such as Windows, Android, MAC, and Linux, among many others.

よくある質問

PDF署名サーバーをどうやって作成できますか?

IronSecureDocを使用してPDF署名サーバーを作成できます。まずIronSecureDocのDockerイメージをインストールし、サーバーをセットアップするためにコンテナを実行します。IronSecureDocクライアントを使用してPDFドキュメントにデジタル署名を処理および適用します。

IronSecureDocを使用してPDF署名サーバーを展開するためにはどのようなステップが必要ですか?

PDF署名サーバーの展開には、IronSecureDocのDockerイメージのインストール、IronSecureDocクライアントの初期化、およびPDFドキュメントにデジタル署名を適用するための使用が含まれます。これにより、ドキュメントの真正性と整合性が保証されます。

PDFドキュメントにデジタル署名を追加するにはどうすればよいですか?

PDFドキュメントにデジタル署名を追加するには、IronSecureDocクライアントを使用します。サービスURLを持ってクライアントを初期化し、サービスに接続してCertifyAsyncメソッドを使用します。PDFファイル、署名証明書、および証明書パスワードのパスを指定します。

デジタル署名のためにIronSecureDocを使用する利点は何ですか?

IronSecureDocは、ドキュメントの整合性と真正性を保証するための高度な暗号化とデジタル署名を提供します。安全なドキュメントの共有、データ保護規則への準拠、そしてユーザーフレンドリーなインターフェースを提供し、高いセキュリティを必要とする企業に最適です。

ドキュメントのセキュリティにおける準拠性をIronSecureDocで支援できますか?

はい、IronSecureDocは、業界標準を満たし、データ漏洩を防ぐ組織を支援するために、安全なドキュメントの処理と送信を提供して、データ保護規則の準拠を達成するのを支援します。

IronSecureDocのDockerイメージをインストールするプロセスは何ですか?

IronSecureDocのDockerイメージをインストールするには、システムにDockerがインストールされていることを確認し、次にコマンドdocker pull ironsoftwareofficial/ironsecuredocを実行してリポジトリからイメージをプルします。

PDFドキュメントの署名用に自己署名デジタルIDを作成するにはどうすればよいですか?

Adobe Acrobatで、プリファレンス > サイン > IDおよび信頼できる証明書の隣の詳細をナビゲートすることによって自己署名デジタルIDを作成できます。デジタルIDを選択し、IDを追加をクリックし、プロンプトに従って新しいデジタルIDを.pfxまたは.p12ファイルに作成します。

IronSecureDocがビジネスおよび法的なドキュメント処理に適している理由は何ですか?

IronSecureDocは、強力な暗号化、デジタル署名、監査トレイル、そしてユーザーフレンドリーなインターフェースを提供するため、ビジネスおよび法律上のドキュメント処理に適しています。これにより不正アクセスからの保護が保証され、ドキュメントの整合性が維持されます。

IronSecureDocの価格設定についてさらに知るにはどこに行けばいいですか?

https://ironsoftware.com/enterprise/securedoc/licensing/ の価格設定ページを訪れることで、IronSecureDocの価格設定についての詳細を知ることができます。無料トライアルと異なる価格オプションの詳細情報を提供しています。

ドキュメントセキュリティにおけるデジタル署名の役割は何ですか?

デジタル署名は、署名者のアイデンティティを確認し、署名されて以降ドキュメントが改変されていないことを保証する暗号的なシールを提供することにより、ドキュメントセキュリティにおいて重要な役割を果たします。

Curtis Chau
テクニカルライター

Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。

開発以外にも、CurtisはIoT(Internet of Things)への強い関心を持ち、ハードウェアとソフトウェアの統合方法を模索しています。余暇には、ゲームをしたりDiscordボットを作成したりして、技術に対する愛情と創造性を組み合わせています。