Look up a /ViewerPreferences name-typed entry by key
Source: R/doc_extra.R
pdf_doc_viewer_preference_by_name.RdPDFium's structured pdf_doc_viewer_preferences() surfaces the
commonly-used entries (print scaling, copies, duplex, page
ranges). For other keys whose value is a /Name (e.g. Direction
= "L2R"/"R2L", ViewArea = "MediaBox"/"CropBox", or
arbitrary author-defined entries), use this by-key lookup.
Wraps FPDF_VIEWERREF_GetName.
Arguments
- doc
A
pdfium_docfrompdf_doc_open(), or a character path.- key
The viewer-preferences dictionary key as a single non-empty character string (ASCII PDF name, e.g.
"Direction").- password
Optional password for encrypted PDFs when
docis a path. Ignored whendocis already an openpdfium_doc.
Value
Character scalar — the entry's name value (without the
leading slash), or NA_character_ when the key is absent or
the value is not a /Name.