Flatten form fields and annotations into the page content stream
Source:R/form_field_setters.R
pdf_page_flatten.RdWraps FPDFPage_Flatten. After flattening, form widgets and
annotations are baked into the page's content stream as static
graphics — they no longer exist as interactive objects. This
is irreversible: there is no pdf_page_unflatten(). Use this
before saving a final-state PDF that downstream consumers must
not edit.
Usage
pdf_page_flatten(page, mode = c("display", "print"))Arguments
- page
A
pdfium_pagefrompdf_page_load(). Parent doc must be readwrite.- mode
Character scalar; one of
"display"or"print".
Details
Two modes:
"display"(default) — bake the on-screen appearance of every annot / widget."print"— bake the print-time appearance instead.
Returns the page invisibly. The parent page's dirty mark is set
so pdf_save() picks up the change.