Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/pypdf/__init__.py: 95%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

20 statements  

1""" 

2pypdf is a free and open-source pure-python PDF library capable of splitting, 

3merging, cropping, and transforming the pages of PDF files. It can also add 

4custom data, viewing options, and passwords to PDF files. pypdf can retrieve 

5text and metadata from PDFs as well. 

6 

7You can read the full docs at https://pypdf.readthedocs.io/. 

8""" 

9 

10from ._configuration import Configuration, apply_configuration, get_configuration, overwrite_configuration 

11from ._crypt_providers import crypt_provider 

12from ._doc_common import DocumentInformation 

13from ._encryption import PasswordType 

14from ._page import PageObject, Transformation 

15from ._reader import PdfReader 

16from ._text_extraction import mult 

17from ._version import __version__ 

18from ._writer import ObjectDeletionFlag, PdfWriter 

19from .constants import ImageType 

20from .pagerange import PageRange, parse_filename_page_ranges 

21from .papersizes import PaperSize 

22 

23try: 

24 import PIL 

25 

26 pil_version = PIL.__version__ 

27except ImportError: 

28 pil_version = "none" 

29 

30_debug_versions = ( 

31 f"pypdf=={__version__}, {crypt_provider=}, PIL={pil_version}" 

32) 

33 

34__all__ = [ 

35 "Configuration", 

36 "DocumentInformation", 

37 "ImageType", 

38 "ObjectDeletionFlag", 

39 "PageObject", 

40 "PageRange", 

41 "PaperSize", 

42 "PasswordType", 

43 "PdfReader", 

44 "PdfWriter", 

45 "Transformation", 

46 "__version__", 

47 "_debug_versions", 

48 "apply_configuration", 

49 "get_configuration", 

50 "mult", 

51 "overwrite_configuration", 

52 "parse_filename_page_ranges", 

53]