pdf-lib supplies identity, type, and options; pdfjs supplies rects, tooltips, and page text,
joined by fully-qualified field name.
When pdf-lib yields no fields, pdfjs becomes the identity source as well: a document whose
objects live in an encrypted object stream reads as empty to pdf-lib, which does not decrypt.
Refusing those as password protected rejected forms whose fields were fully readable, so
encryption is a verdict only when pdfjs cannot read the document either.
pdf-lib supplies identity, type, and options; pdfjs supplies rects, tooltips, and page text, joined by fully-qualified field name.
When pdf-lib yields no fields, pdfjs becomes the identity source as well: a document whose objects live in an encrypted object stream reads as empty to pdf-lib, which does not decrypt. Refusing those as password protected rejected forms whose fields were fully readable, so encryption is a verdict only when pdfjs cannot read the document either.