Section:

PDFSecure: Command-line PDF Security & Encryption

Apryse's PDFSecure is a stand-alone command-line application that provides users with an efficient means of adding, removing, or changing security settings on existing PDF documents or whole directories of documents. PDFSecure can also be used to modify document information metadata and to web-optimize files through a process known as linearization.

Like other Apryse products, PDFSecure does not rely on any other third-party software.

PDFSecure is also available as a library component of PDF SDK that can be used as a building block for other client and server-based applications. Please see https://apryse.com/products/core-sdk/pdf/ for more information.

Why PDFSecure?

  • Encryption. PDFSecure supports industry standard PDF security (RC4 and AES).
  • Efficiency. PDFSecure is based on our PDF SDK, making it extremely fast and efficient.
  • Support for very large documents.
  • Built-in support for multi-threading makes PDFSecure a good match for multi-threaded, server-based applications.
  • Support for all PDF formats (PDF 1.0 to ISO32000) and Acrobat documents.

Key Functions

  • Encrypt any PDF document using AES (Advanced Encryption Standard) encryption and Crypt filters.
  • Encrypt any document using standard PDF 40 and 128 RC4 bit encryption.
  • Modify security settings (for example, change passwords or security permissions).
  • Completely remove security from existing documents.
  • Set of modify document information metadata such as Author, Subject, Title, Keywords, etc.
  • Linearize and optimize existing PDF documents for 'Fast Web View' capability and faster downloading.
  • Files with broken cross reference tables are automatically repaired.
  • Configuration file for frequently used options.
  • Supports automation and batch processing.

Common Use Case Scenarios

  • Server-based, on-demand encryption and decryption of PDF documents based on specific security requirements.
  • Batch processing of PDF collections that require uniform security and permission settings across many documents. PDFSecure is particularly useful in assembling product catalogues, brochures, and forms.
  • Linearization of existing PDF documents for 'Fast Web View' capability.

Operating Systems Supported

  • Windows, Linux and Mac.

Examples

sh

1#!/bin/sh
2echo "Example 1) Securing a single PDF document using 128 bit RC4 encryption and user (open) password:"
3./pdfsecure -o test_out/ex1/blue_secret.pdf -s 128 -u secret test/blue.pdf --lic_key "<PDFNET_LICENSE_KEY>"
4echo
5echo "Example 2) Securing a folder of PDF documents using AES encryption and user (open) password:"
6./pdfsecure -o test_out/ex2 -s AES -u secret test --lic_key "<PDFNET_LICENSE_KEY>"
7echo
8echo "Example 3) Securing a file with a user (open) and an owner (permission) password and setting permissions:"
9./pdfsecure -o test_out/ex3/r1.pdf -s 128 -u userpass -w ownerpass -d a test/red.pdf --lic_key "<PDFNET_LICENSE_KEY>"
10echo
11echo "Example 4) Setting permissions:"
12./pdfsecure -o test_out/ex4 -s 128 -w foo -d mcofxs -e ph --subfolders test --lic_key "<PDFNET_LICENSE_KEY>"
13./pdfsecure -o test_out/ex4/out2.pdf -s 128 -w foo -d ms -e cox test/red.pdf --lic_key "<PDFNET_LICENSE_KEY>"
14echo
15echo "Example 5) Removing Security:"
16./pdfsecure -o test_out/ex5 -s R test test_out/ex4/out2.pdf --lic_key "<PDFNET_LICENSE_KEY>"
17./pdfsecure -o test_out/ex5 -s R test test_out/ex4 --lic_key "<PDFNET_LICENSE_KEY>"
18./pdfsecure -o test_out/ex5/ex3r1.pdf -s R -p userpass test_out/ex3/r1.pdf --lic_key "<PDFNET_LICENSE_KEY>"
19./pdfsecure -o test_out/ex5 -s R -p secret test_out/ex2/test --subfolders --lic_key "<PDFNET_LICENSE_KEY>"
20./pdfsecure -o test_out/ex5/e1.pdf -s R -p secret test_out/ex1/blue_secret.pdf --lic_key "<PDFNET_LICENSE_KEY>"
21echo
22echo "Example 6) Modifying document information metadata:"
23./pdfsecure -o test_out/ex6 --title "My Title" --subject "My Subject" --creator "Source App" --producer "PDF Secure" --author "Joe Doe" --keywords "key1 key2 key3" test --lic_key "<PDFNET_LICENSE_KEY>"
24echo
25echo "Example 7) PDF Linearization (Fast Web View Enabling):"
26./pdfsecure -o test_out/ex7 -l test_out/ex6/test --lic_key "<PDFNET_LICENSE_KEY>"
27echo
28echo "Example 8) Combining different operations:"
29./pdfsecure -o test_out/ex8 -l --title "My Title" --subject "My Subject" --creator "Source App" --producer "PDF Secure" --author "Joe Doe" --keywords "key1 key2 key3" -s AES -u userpass -w ownerpass -d chsmx -e of test --lic_key "<PDFNET_LICENSE_KEY>"

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales