Skip to main content

Français

La bibliothèque PyPDF2_Fields est un complément à PyPDF2. Elle aide à l’utilisation des champs d’un fichier PDF en facilitant les tâches suivantes.

  • Lire la valeur des champs
  • Modifier la valeur des champs
  • Identifier le type d’un champ
  • Assurer la visibilité du contenu des champs
  • Déterminer si les champs d’un fichier PDF généré par une application seront modifiables

À cette fin, PyPDF2_Fields fournit les fonctions ci-dessous.

  • get_field_type

Identifie le type d’un champ d’un fichier PDF. La valeur renvoyée est un membre de l’énumeration PdfFieldType, aussi incluse dans cette bibliothèque.

  • make_writer_from_reader

Crée un objet PdfFileWriter dont le contenu est identique à celui de l’objet PdfFileReader donné. Selon le choix de l’appelant, les champs du fichier produit par cet écriveur seront modifiables ou non.

  • pair_fields_name_and_val

Constitue un dictionnaire associant le nom des champs à leur valeur.

  • set_need_appearances

Assure qu’un PdfFileWriter produira un fichier dont le contenu des champs sera visible.

  • update_page_fields

Définit la valeur des champs de texte, des boîtes à cocher et des groupes de boutons radio. Cette fonction utilise des instances de la classe RadioBtnGroup, aussi incluse dans cette bibliothèque.

Voyez les exemples d'utilisation demo_field_names_vals.py et demo_update_fields.py dans le dépôt de code source.

English

Library PyPDF2_Fields is a complement to PyPDF2. It helps using a PDF file’s fields by facilitating the following tasks.

  • Reading the fields' value
  • Setting the fields' value
  • Identifying a field’s type
  • Ensuring the visibility of the fields’ content
  • Determining whether the fields of a PDF file generated by an application will be editable

For this purpose, PyPDF2 provides the functions below.

  • get_field_type

Identifies the type of a PDF file's field. The returned value is a member of enumeration PdfFieldType, which is also included in this library.

  • make_writer_from_reader

Creates a PdfFileWriter object whose content is identical to that of the given PdfFileReader object. Depending on the caller’s choice, the fields of the file produced by that writer will be editable or not.

  • pair_fields_name_and_val

Creates a dictionary that maps the fields’ name to their value.

  • set_need_appearances

Ensures that a PdfFileWriter will produce a file with fields whose content will be visible.

  • update_page_fields

Sets the value of text fields, checkboxes and radio button groups. This function uses instances of class RadioBtnGroup, which is also included in this library.

See usage examples demo_field_names_vals.py and demo_update_fields.py in the source code repository.

Release files for PyPDF2-Fields 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyPDF2-Fields 1.0.1
File Size Uploaded
PyPDF2_Fields-1.0.1.tar.gz 7.4 kB Details

Release files / PyPDF2_Fields-1.0.1.tar.gz

Download URL PyPDF2_Fields-1.0.1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
22f03264d022d8e8e89881ed745047797ae8bf697e69705ffc39f072691710e1
BLAKE2b-256 checksum
How to use checksums
f6f23b8cd68b264717df1776448e887089dcd67c9927e482e7aa0d2b383ff66e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page