-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path__init__.py
More file actions
144 lines (140 loc) · 2.9 KB
/
Copy path__init__.py
File metadata and controls
144 lines (140 loc) · 2.9 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
"""pdf-edit-engine: Format-preserving PDF text editing engine."""
from __future__ import annotations
__version__ = "0.2.0"
from pdf_edit_engine.annotations import (
Annotation,
add_annotation,
delete_annotation,
get_annotations,
move_annotation,
update_annotation_uri,
)
from pdf_edit_engine.errors import (
EncodingError,
FontNotFoundError,
OperatorError,
PDFEditError,
ReflowError,
)
from pdf_edit_engine.fonts import analyze_subset, can_render, extend_subset
from pdf_edit_engine.locator import (
extract_bbox_text,
find,
get_fonts,
get_text,
get_text_layout,
)
from pdf_edit_engine.models import (
DEGRADATION_KINDS,
FONT_AFFECTING_KINDS,
ContentElement,
Degradation,
DegradationKind,
Edit,
EditResult,
FidelityReport,
FontInfo,
GraphicsStateSnapshot,
Paragraph,
TextBlock,
TextCharacter,
TextMatch,
)
from pdf_edit_engine.reflow import detect_paragraphs, reflow_paragraph
from pdf_edit_engine.structural import (
batch_replace_block,
compute_uniform_layout,
delete_block,
insert_text_block,
replace_block,
shift_content_below,
)
from pdf_edit_engine.surgeon import batch_replace, replace, replace_all
from pdf_edit_engine.wrapper import (
add_bookmark,
add_highlight,
add_hyperlink,
add_watermark,
crop_pages,
decrypt_pdf,
delete_pages,
edit_metadata,
encrypt_pdf,
fill_form,
flatten_annotations,
merge_pdfs,
reorder_pages,
rotate_pages,
split_pdf,
)
__all__ = [
# locator
"find",
"get_text",
"get_text_layout",
"get_fonts",
"extract_bbox_text",
# surgeon
"replace",
"replace_all",
"batch_replace",
# structural
"replace_block",
"batch_replace_block",
"delete_block",
"insert_text_block",
"shift_content_below",
"compute_uniform_layout",
# fonts
"analyze_subset",
"can_render",
"extend_subset",
# reflow
"detect_paragraphs",
"reflow_paragraph",
"Paragraph",
# wrapper
"merge_pdfs",
"split_pdf",
"reorder_pages",
"rotate_pages",
"delete_pages",
"crop_pages",
"edit_metadata",
"add_bookmark",
"encrypt_pdf",
"decrypt_pdf",
"add_hyperlink",
"add_highlight",
"flatten_annotations",
"fill_form",
"add_watermark",
# annotations
"get_annotations",
"add_annotation",
"update_annotation_uri",
"delete_annotation",
"move_annotation",
"Annotation",
# models
"TextMatch",
"TextCharacter",
"TextBlock",
"EditResult",
"FidelityReport",
"FontInfo",
"Edit",
"ContentElement",
"GraphicsStateSnapshot",
# honesty taxonomy (B1)
"Degradation",
"DegradationKind",
"FONT_AFFECTING_KINDS",
"DEGRADATION_KINDS",
# errors
"PDFEditError",
"FontNotFoundError",
"EncodingError",
"OperatorError",
"ReflowError",
]