Skip to main content

Encrypt

Encrypts a PDF file with password protection using industry-standard encryption algorithms to secure sensitive documents.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • PDF Path - Path to the PDF file to encrypt.

Options

  • PDF Path to Save - Output path where the encrypted PDF will be saved. If not provided, the original file is encrypted in place.
  • Mode - Encryption algorithm to use. Options: AES (recommended) or RC4. Default is AES.
  • Key Length - Encryption key length in bits. Options: 40, 128, or 256. Default is 256.
  • Owner Password - Owner password for the PDF. Grants full permissions including changing security settings.
  • User Password - User password for the PDF. Required to open and view the document.
Password Types
  • Owner Password: Full control including changing security settings and permissions
  • User Password: Required to open the document for viewing
  • You can set one or both passwords depending on your security requirements

Output

This node does not produce any output variables. The encrypted PDF is saved to the specified path or overwrites the original.

How It Works

The Encrypt node applies password protection to PDF files using standard encryption. When executed, the node:

  1. Validates the input PDF path
  2. Retrieves the owner and user passwords from credentials
  3. Configures encryption based on the selected mode and key length
  4. Applies encryption to the PDF
  5. Saves the encrypted PDF to the output path or overwrites the original

Encryption Modes

  • Security: Industry-standard, highly secure
  • Compatibility: Supported by all modern PDF readers
  • Performance: Fast encryption and decryption
  • Key Lengths: 128-bit or 256-bit
  • Recommendation: Use 256-bit for maximum security

RC4 (Rivest Cipher 4) - Legacy

  • Security: Less secure than AES
  • Compatibility: Supported by older PDF readers
  • Performance: Fast but outdated
  • Key Lengths: 40-bit, 128-bit
  • Recommendation: Only use for compatibility with legacy systems

Key Length Options

Key LengthSecurity LevelUse Case
40-bitLowLegacy systems only
128-bitMediumStandard security
256-bitHighMaximum security (recommended)

Use Cases

  • Document Security: Protect confidential reports, contracts, or financial documents
  • Compliance: Meet regulatory requirements for document encryption
  • Access Control: Restrict document access to authorized users
  • Automated Workflows: Encrypt documents automatically before distribution
  • Archive Protection: Secure archived documents with passwords
  • Client Distribution: Protect sensitive client documents during delivery

Password Best Practices

  • Strong Passwords: Use complex passwords with mixed characters
  • Different Passwords: Use different owner and user passwords for better control
  • Secure Storage: Store passwords securely in Robomotion Vault
  • Password Sharing: Share user password securely with intended recipients
  • Owner Password: Keep owner password restricted to administrators

Example Workflows

Basic Encryption

  1. Generate or receive a PDF file
  2. Use Encrypt node with user password
  3. Distribute encrypted PDF with password shared separately

Two-Level Security

  1. Set owner password for administrative control
  2. Set user password for viewing access
  3. Share user password with recipients
  4. Keep owner password for future modifications

Batch Encryption

  1. Loop through multiple PDF files
  2. Encrypt each with same or unique passwords
  3. Save encrypted versions to secure directory

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid PDF path
  • PDF file not found at the specified path
  • PDF file is already encrypted
  • Invalid password credentials
  • Password retrieval fails
  • Insufficient permissions to read the PDF file
  • Insufficient permissions to write to output path or overwrite original
  • Invalid encryption mode or key length combination

Usage Notes

  • Original PDF remains unchanged when an output path is specified
  • Without an output path, the original file is overwritten with encrypted version
  • At least one password (owner or user) should be set for effective encryption
  • Passwords are retrieved from Robomotion credential system
  • Use Vault nodes to manage passwords securely
  • The encrypted PDF requires the password to open in any PDF reader
  • Lost passwords cannot be recovered - keep backups of passwords
  • Encryption adds minimal overhead to file size
  • AES with 256-bit key is recommended for new encryptions

Tips for Effective Use

  • Backup First: Always backup original files before encrypting in place
  • Test Passwords: Verify passwords work by opening encrypted PDFs
  • Use Vault: Store passwords in Robomotion Vault for secure access
  • Document Management: Keep a secure record of which passwords are used for which files
  • Separate Output: Use output path to preserve unencrypted originals
  • Consistent Settings: Use consistent encryption settings across your organization
  • 256-bit AES: Default to AES mode with 256-bit key for best security
  • Password Complexity: Use strong passwords with at least 12 characters
  • Automation: Encrypt documents automatically in workflows before sending

Security Recommendations

  1. Use AES 256-bit: Provides the strongest available encryption
  2. Strong Passwords: Minimum 12 characters with mixed case, numbers, symbols
  3. Separate Passwords: Use different owner and user passwords
  4. Secure Storage: Never hardcode passwords; use Vault
  5. Regular Updates: Update passwords periodically for high-security documents
  6. Access Logging: Log encryption operations for audit trails

Common Issues and Solutions

Issue: PDF Already Encrypted

Solution: Use Decrypt node first to remove existing encryption

Issue: Password Not Working

Solution: Verify credential configuration and ensure password is correctly stored in Vault

Issue: Can't Open Encrypted PDF

Solution: Ensure you're using the user password, not the owner password

Issue: Compatibility Problems

Solution: Use AES 128-bit for maximum compatibility with older readers

  • Decrypt: Remove encryption from password-protected PDFs
  • Change Password: Modify passwords on already encrypted PDFs
  • Optimize: Optimize before encrypting for smaller file sizes