Adds and verifies provider-backed digital signatures.
The default provider signs incrementally with PAdES and PKCS#8 PEM material
using Elixir/OTP only. Select another provider per call with :provider or
configure one globally with config :paper_forge, :signature_provider.
{:ok, signed_pdf} =
PaperForge.Signature.sign(pdf,
certificate: {:pkcs8, key_path: "key.pem", cert_path: "cert.pem"},
reason: "Contract approval",
location: "Monterrey, Mexico"
)Passwords and private keys are call-time values and are never stored in a declarative template or compiled-template cache.
Summary
Functions
Returns the capabilities advertised by the selected provider.
Signs a PDF binary without rewriting its original revision.
Signs a PDF binary and raises when the provider rejects the operation.
Signs an existing PDF and writes the signed revision to destination.
Verifies a signed PDF with the selected provider and trust policy.
Types
Functions
@spec capabilities(keyword()) :: [PaperForge.Signature.Provider.capability()]
Returns the capabilities advertised by the selected provider.
Signs a PDF binary without rewriting its original revision.
Signs a PDF binary and raises when the provider rejects the operation.
Signs an existing PDF and writes the signed revision to destination.
Verifies a signed PDF with the selected provider and trust policy.