フォームフィールドのフラット化

The Documentize PDF Form for .NET allows you to convert interactive PDF forms into non-editable documents, making them secure from unauthorized modifications. This tool transforms form fields into static content, enhancing the security of your PDF documents. It is particularly useful when you need to secure contracts, agreements, or any document where form fields must remain unchanged.

PDFでフォームフィールドをフラット化する方法

To flatten form fields in a PDF document, follow these steps:

  1. Create an instance of the FlattenFieldsOptions class.
  2. Add the input and output files to the options.
  3. Call the Flatten method to perform the flattening operation.
​
1 // Create FlattenFieldsOptions object to set instructions
2 var options = new FlattenFieldsOptions();
3 // Add input file path
4 options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
5 // Set output file path
6 options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
7 // Perform the process
8 PdfForm.Flatten(options);

PDFで最初のフィールド以外すべてをフラット化する方法

You can selectively flatten only specific form fields based on criteria such as the field’s position or name.

​
 1 // Get Fields Names
 2 var fieldNames = PdfForm.GetNames(new GetFieldNamesOptions("path_to_your_pdf_file.pdf"));
 3 // Create FlattenFieldsOptions object to set instructions
 4 var options = new FlattenFieldsOptions();
 5 options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
 6 options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
 7 // Skip 1 field.
 8 options.SkipFields.Add(fieldNames[0]);
 9 // Perform the process
10 PdfForm.Flatten(options);

主な機能:

  • すべてのフォームフィールドをフラット化: インタラクティブなフォームフィールドを編集不可な静的コンテンツに変換します。
  • 選択したフィールドだけをフラット化: PDF 内の特定のフィールドだけをフラット化し、他のフィールドは編集可能なままにします。
 日本語