Skip to content

Commit 6379966

Browse files
committed
MAINT: docs: Simplify flattening documentation
1 parent 84b656c commit 6379966

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/user/forms.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ dialog for users who open the generated PDF.
4848

4949
If you want to flatten your form, that is, keeping all form field contents while
5050
removing the form fields themselves, you can set the `flatten` parameter in
51-
`update_page_form_field_values()` to `True`, to convert form field contents to
52-
regular PDF content, and then use `writer.remove_annotations(subtypes="/Widget")`
53-
to remove all form fields. This will result in a flattened PDF.
51+
{func}`~pypdf._writer.PdfWriter.update_page_form_field_values` to `True`. This
52+
will convert form field contents to regular PDF content. Afterwards, use
53+
{func}`~pypdf._writer.PdfWriter.remove_annotations` with `subtypes="/Widget"`
54+
to remove all form fields to get an actual flattened PDF.
5455

5556
## Some notes about form fields and annotations
5657

0 commit comments

Comments
 (0)