Documentation
¶
Overview ¶
Package pdf inspects uploaded PDFs: limits, encryption, existing signatures, and whether Inkless can seal them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTooLarge means the file exceeds Limits.MaxBytes. ErrTooLarge = errors.New("pdf exceeds the size limit") // ErrMalformed means the input is not a parseable PDF. ErrMalformed = errors.New("pdf is malformed") // ErrEncrypted means the PDF has an Encrypt dictionary. ErrEncrypted = errors.New("pdf is encrypted") // ErrTooManyPages means the PDF has more than Limits.MaxPages pages. ErrTooManyPages = errors.New("pdf exceeds the page limit") // ErrSigned means the PDF already carries a signature or certification. ErrSigned = errors.New("pdf already contains signatures") // ErrUnsealable means the PDF structure cannot be sealed by this service. ErrUnsealable = errors.New("pdf structure is not supported for sealing") )
Errors returned by Inspect, one per rejection reason.
View Source
var DefaultLimits = Limits{MaxBytes: 20 << 20, MaxPages: 200}
DefaultLimits allows 20 MiB and 200 pages.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.