Protected document/PDF
Description
Cloud service for publishing or delivering a PDF with visitor identification, optional password protection, real file encryption, and a choice between inline viewing and download. It is not a page editor or a signature workflow; it controls delivery of a finished document.
Use cases
- Deliver contracts, certificates, reports, or invoices to an identified visitor.
- Publish a PDF behind a password without exposing the stored file.
- Request a tax ID, name, email, or phone before access.
- Offer browser viewing or an explicit download.
- Keep the document private for its owner and Cloud collaborators.
How to create the service
Select Cloud > New item > Protected document/PDF. Enter a name and description, attach a PDF up to 10 MB, choose the identity detail, set an optional password, and select inline viewing if needed. The configuration screen opens after saving. New documents are private; publish or share them through Cloud when ready.
A password must contain at least ten characters, an uppercase letter, a lowercase letter, and a number. When set, the server wraps the PDF in authenticated AES-256-GCM encryption. The plain password is never stored: a hash validates it and an application-encrypted secret enables authorized delivery.
Interface and controls
Configure protected PDF can rename and describe the service, replace its PDF, select the identity field, enable generic access, switch inline viewing, rotate the password, or remove it. It also reports whether the stored file is encrypted.
The Cloud detail retains View and Properties, Users, visibility, analytics, and its public link. Owners and authorized collaborators can preview without entering public credentials again.
Public access workflow
- The visitor opens the public URL; a private document returns not found.
- Unless access is generic, the visitor enters the configured identity detail. Tax ID, name, email, and phone formats are validated.
- A configured password must be correct. Attempts are rate limited.
- Authorization remains in the session for 30 minutes and is invalidated when settings or credentials change.
- Inline view embeds the PDF and still offers download. Download mode displays only the Download PDF action.
- Each authorized access contributes to the usual Cloud views and usage accounting.
Configuration options
- Identity detail: tax ID, name, email, or phone. It identifies an access but does not compare the value with a recipient allowlist.
- Generic access: skips identity. A configured password remains required.
- Optional password: protects web access and encrypts the file at rest with AES-256.
- Inline view: serves the content inside the browser. When disabled, the experience is download-oriented.
- Replace PDF: swaps the content while keeping the access policy and reapplies effective encryption.
- New password: rotates the credential and re-encrypts the stored file. Blank keeps the current password.
- Remove password: decrypts the stored file and removes both its hash and encrypted secret.
- Visibility: private is limited to owner and collaborators; public enables the external URL under these rules.
Files, delivery, and security
Only a compatible PDF extension and MIME are accepted. The file stays on the private local disk and is never linked directly. An authorized delivery creates a temporary decrypted copy, responds as application/pdf with no-store, MIME-sniffing protection, and a sandbox policy, then deletes that copy after sending it.
Legacy documents remain accessible. Their previous identity, generic access, and direct-view values are honored without inventing encryption or a password that did not exist.
Output and export formats
The result is the same PDF delivered inline or as a download, without changing its pages. Access protection does not convert the document. Use File Transformer to create PDF/A, images, Word, or other formats, and ONLYOFFICE PDF to edit pages or text.
Saving, downloading, and sharing
Saving updates settings and may replace or re-encrypt the PDF. Share copies the public URL, but visitors can use it only when visibility is public. Users grants permissions to Apification accounts and lets authorized collaborators bypass the public credential form.
Limits and technical requirements
The 10 MB limit, storage quota, and Cloud permissions apply. Encryption, decryption, password rotation, and protection removal run inside the application without an external executable. A cryptographic validation failure stops the operation without replacing the original PDF.
Common errors
- The file is rejected: check
.pdf, actual MIME, size, and file integrity. - The password is rejected: follow the complexity policy and check character case and numbers.
- The URL returns 404: the document is private or the account lacks permission.
- The viewer is missing: check Inline view and browser PDF support.
- Encryption or rotation fails: verify the application key and PHP OpenSSL support.
Privacy and data processing
The identity detail validates input and its fingerprint is retained only in the authorization session; the form is not a recipient allowlist. For highly sensitive content, combine private visibility, named users, and a password. Do not publish a URL merely because it includes an identity form.
Frequently asked questions
- Does the password really encrypt the PDF? Yes. The private file uses AES-256 and is decrypted only to a temporary copy after authorization.
- Can I replace the PDF without creating another service? Yes, from Configure protected PDF.
- Can I edit pages or text? No; use ONLYOFFICE PDF or File Transformer.
- Can it collect signatures? No; use PDF electronic signature for signers, fields, evidence, and states.
- Is identification the same as named authorization? No. Use shared visibility and Users to restrict specific accounts.
Related services
ONLYOFFICE PDF for editing, File Transformer for conversion and page operations, and PDF electronic signature for signing requests and evidence.