forked from reingart/pyfpdf
-
Notifications
You must be signed in to change notification settings - Fork 269
/
Copy path__init__.py
52 lines (44 loc) · 1.22 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python
import sys
from .enums import Align, TextMode, XPos, YPos
from .fpdf import (
FPDF,
FPDFException,
TitleStyle,
FPDF_FONT_DIR as _FPDF_FONT_DIR,
FPDF_VERSION as _FPDF_VERSION,
)
from .html import HTMLMixin, HTML2FPDF
from .prefs import ViewerPreferences
from .template import Template, FlexTemplate
from .deprecation import WarnOnDeprecatedModuleAttributes
FPDF_VERSION = _FPDF_VERSION
"Current FPDF Version, also available via `__version__`"
FPDF_FONT_DIR = _FPDF_FONT_DIR
"""This is the location of where to look for fonts."""
# Pattern from sir Guido Von Rossum: https://stackoverflow.com/a/72911884/636849
# > a module can define a class with the desired functionality, and then at
# > the end, replace itself in sys.modules with an instance of that class
sys.modules[__name__].__class__ = WarnOnDeprecatedModuleAttributes
__license__ = "LGPL 3.0"
__version__ = FPDF_VERSION
__all__ = [
# metadata
"__version__",
"__license__",
# Classes
"FPDF",
"FPDFException",
"Align",
"XPos",
"YPos",
"Template",
"FlexTemplate",
"TitleStyle",
"ViewerPreferences",
"HTMLMixin",
"HTML2FPDF",
# FPDF Constants
"FPDF_VERSION",
"FPDF_FONT_DIR",
]