groupdocs-annotation-net 0.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: groupdocs-annotation-net
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: GroupDocs.Annotation for Python via .NET - Add annotations, markups and comments to documents and images
|
|
5
|
+
Author-email: GroupDocs <support@groupdocs.com>
|
|
6
|
+
License-Expression: LicenseRef-Proprietary
|
|
7
|
+
Project-URL: Homepage, https://products.groupdocs.com/annotation/python-net/
|
|
8
|
+
Project-URL: Documentation, https://docs.groupdocs.com/annotation/python-net/
|
|
9
|
+
Keywords: annotation,annotate,markup,comment,document,pdf,docx,image,groupdocs,dotnet
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Operating System :: Unix
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
26
|
+
Classifier: Topic :: Utilities
|
|
27
|
+
Requires-Python: <3.15,>=3.5
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
[](https://docs.groupdocs.com/annotation/python-net/)
|
|
31
|
+
|
|
32
|
+
[](https://pypi.org/project/groupdocs-annotation-net/) [](https://pypi.org/project/groupdocs-annotation-net/)
|
|
33
|
+
|
|
34
|
+
[Product Page](https://products.groupdocs.com/annotation/python-net/) | [Docs](https://docs.groupdocs.com/annotation/python-net/) | [Demos](https://products.groupdocs.app/annotation/family) | [API Reference](https://reference.groupdocs.com/annotation/python-net/) | [Blog](https://blog.groupdocs.com/category/annotation/) | [Free Support](https://forum.groupdocs.com/c/annotation) | [Temporary License](https://purchase.groupdocs.com/temporary-license)
|
|
35
|
+
|
|
36
|
+
GroupDocs.Annotation for Python via .NET is a document-annotation API for adding, editing, and removing markup on documents and images. Draw area, point, arrow, ellipse, and distance shapes; highlight, underline, strikeout, squiggly, and replace text; add watermarks, images, links, and text fields; thread review comments (replies) on any annotation; then save the result back to the original format or export/import the annotations as XML — across PDF, Word, Excel, PowerPoint, Visio, images, and more through one unified API, with no MS Office or other external software required.
|
|
37
|
+
|
|
38
|
+
## Get Started
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install groupdocs-annotation-net
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from groupdocs.annotation import Annotator
|
|
46
|
+
from groupdocs.annotation.models.annotation_models import AreaAnnotation
|
|
47
|
+
from groupdocs.annotation.models import Rectangle
|
|
48
|
+
|
|
49
|
+
with Annotator("document.pdf") as annotator:
|
|
50
|
+
area = AreaAnnotation()
|
|
51
|
+
area.box = Rectangle(100, 100, 200, 80) # x, y, width, height
|
|
52
|
+
area.page_number = 0
|
|
53
|
+
area.message = "Review this section"
|
|
54
|
+
annotator.add(area)
|
|
55
|
+
annotator.save("annotated.pdf")
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## How It Works
|
|
59
|
+
|
|
60
|
+
The package is a self-contained Python wheel that bundles the embedded .NET runtime and every native dependency (SkiaSharp, Aspose.Drawing) needed to load, annotate, render, and save documents. No external software installation is required — just `pip install` and start annotating. The wheel works across Python 3.5 – 3.14 on Windows, Linux, and macOS (Intel + Apple Silicon).
|
|
61
|
+
|
|
62
|
+
## Features
|
|
63
|
+
|
|
64
|
+
- **Shape annotations** — area, point, arrow, ellipse, polyline, and distance markups with configurable box, color, pen style, and opacity.
|
|
65
|
+
- **Text markup** — highlight, underline, strikeout, squiggly, replacement, and redaction annotations over document text.
|
|
66
|
+
- **Content annotations** — watermarks, image stamps, link annotations, and editable text-field annotations.
|
|
67
|
+
- **Comments & replies** — thread review comments on any annotation, each with an author and timestamp.
|
|
68
|
+
- **Add / update / remove** — full lifecycle on annotations, individually or in batches, addressed by object or id.
|
|
69
|
+
- **Versioning** — read back annotation versions and a specific version's annotations.
|
|
70
|
+
- **Import / export** — round-trip annotations to/from an XML file or another document, separate from the source.
|
|
71
|
+
- **Previews** — render pages to PNG/JPEG/BMP images via a page-stream callback.
|
|
72
|
+
- **Document introspection** — read format, page count, and per-page dimensions before processing.
|
|
73
|
+
- **Cross-Platform** — Windows x64/x86, Linux x64, macOS x64/ARM64.
|
|
74
|
+
|
|
75
|
+
## Common Tasks
|
|
76
|
+
|
|
77
|
+
- Add a colored box or arrow over a region of a PDF page and save it back
|
|
78
|
+
- Highlight, underline, or strike out a passage of text in a document
|
|
79
|
+
- Stamp a watermark or an image annotation onto a page
|
|
80
|
+
- Attach a thread of review comments (replies) to an annotation
|
|
81
|
+
- List, update, or remove the annotations already on a document
|
|
82
|
+
- Export a document's annotations to XML and re-import them later
|
|
83
|
+
- Render annotated pages to images for a preview UI
|
|
84
|
+
|
|
85
|
+
## Supported File Formats
|
|
86
|
+
|
|
87
|
+
For a complete list, see [supported formats](https://docs.groupdocs.com/annotation/net/supported-document-formats/).
|
|
88
|
+
|
|
89
|
+
| Category | Formats |
|
|
90
|
+
|---|---|
|
|
91
|
+
| **Word Processing** | DOC, DOCX, DOCM, DOT, DOTX, DOTM, RTF, ODT, OTT, TXT |
|
|
92
|
+
| **Spreadsheets** | XLS, XLSX, XLSM, XLSB, ODS, CSV |
|
|
93
|
+
| **Presentations** | PPT, PPTX, PPTM, PPS, PPSX, ODP |
|
|
94
|
+
| **Fixed-Layout** | PDF, TEX |
|
|
95
|
+
| **Diagrams** | VSD, VSDX, VSS, VSSX, VSDM |
|
|
96
|
+
| **Images** | BMP, JPG, JPEG, PNG, GIF, TIFF, WEBP, DCM, EMF, WMF |
|
|
97
|
+
| **Web & Email** | HTML, MHTML, EML, EMLX, MSG |
|
|
98
|
+
|
|
99
|
+
## Examples
|
|
100
|
+
|
|
101
|
+
### Add an area annotation
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from groupdocs.annotation import Annotator
|
|
105
|
+
from groupdocs.annotation.models.annotation_models import AreaAnnotation
|
|
106
|
+
from groupdocs.annotation.models import Rectangle
|
|
107
|
+
|
|
108
|
+
with Annotator("document.pdf") as annotator:
|
|
109
|
+
area = AreaAnnotation()
|
|
110
|
+
area.box = Rectangle(100, 100, 200, 80) # x, y, width, height
|
|
111
|
+
area.background_color = 65535 # ARGB integer
|
|
112
|
+
area.page_number = 0
|
|
113
|
+
area.message = "Needs review"
|
|
114
|
+
annotator.add(area)
|
|
115
|
+
annotator.save("annotated.pdf")
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Attach review comments (replies)
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
from groupdocs.annotation import Annotator
|
|
122
|
+
from groupdocs.annotation.models.annotation_models import AreaAnnotation
|
|
123
|
+
from groupdocs.annotation.models import Rectangle, Reply
|
|
124
|
+
|
|
125
|
+
reply1 = Reply(); reply1.comment = "Please double-check the figures"
|
|
126
|
+
reply2 = Reply(); reply2.comment = "Confirmed — looks good"
|
|
127
|
+
|
|
128
|
+
with Annotator("document.pdf") as annotator:
|
|
129
|
+
area = AreaAnnotation()
|
|
130
|
+
area.box = Rectangle(80, 80, 160, 60)
|
|
131
|
+
area.page_number = 0
|
|
132
|
+
area.replies = [reply1, reply2]
|
|
133
|
+
annotator.add(area)
|
|
134
|
+
annotator.save("reviewed.pdf")
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### List, update and remove annotations
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
from groupdocs.annotation import Annotator
|
|
141
|
+
|
|
142
|
+
with Annotator("annotated.pdf") as annotator:
|
|
143
|
+
annotations = annotator.get() # all annotations on the document
|
|
144
|
+
for a in annotations:
|
|
145
|
+
print(a.id, a.page_number, a.message)
|
|
146
|
+
if annotations:
|
|
147
|
+
annotator.remove(annotations[0]) # by object (or annotator.remove(id))
|
|
148
|
+
annotator.save("cleaned.pdf")
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Read annotation versions
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
from groupdocs.annotation import Annotator
|
|
155
|
+
|
|
156
|
+
with Annotator("annotated.pdf") as annotator:
|
|
157
|
+
versions = annotator.get_versions_list() # available annotation versions
|
|
158
|
+
for v in versions:
|
|
159
|
+
print("version:", v)
|
|
160
|
+
for a in annotator.get_version(v): # annotations in that version
|
|
161
|
+
print(" ", a.id, a.message)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Render a page preview
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
from groupdocs.annotation import Annotator
|
|
168
|
+
from groupdocs.annotation.options import PreviewOptions, PreviewFormats
|
|
169
|
+
|
|
170
|
+
def create_page_stream(page_number):
|
|
171
|
+
return open(f"page-{page_number}.png", "wb")
|
|
172
|
+
|
|
173
|
+
with Annotator("document.pdf") as annotator:
|
|
174
|
+
opts = PreviewOptions(create_page_stream)
|
|
175
|
+
opts.preview_format = PreviewFormats.PNG
|
|
176
|
+
opts.page_numbers = [0, 1]
|
|
177
|
+
annotator.document.generate_preview(opts)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Annotate from / to a binary stream
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
import io
|
|
184
|
+
from groupdocs.annotation import Annotator
|
|
185
|
+
from groupdocs.annotation.models.annotation_models import AreaAnnotation
|
|
186
|
+
from groupdocs.annotation.models import Rectangle
|
|
187
|
+
|
|
188
|
+
with open("document.pdf", "rb") as src:
|
|
189
|
+
with Annotator(src) as annotator:
|
|
190
|
+
area = AreaAnnotation(); area.box = Rectangle(50, 50, 120, 40); area.page_number = 0
|
|
191
|
+
annotator.add(area)
|
|
192
|
+
buffer = io.BytesIO()
|
|
193
|
+
annotator.save(buffer) # BytesIO is updated after save
|
|
194
|
+
data = buffer.getvalue()
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## AI Agent & LLM Friendly
|
|
198
|
+
|
|
199
|
+
This package is designed for seamless integration with AI agents, LLMs, and automated code generation tools.
|
|
200
|
+
|
|
201
|
+
- **`AGENTS.md` in the package** — AI coding assistants (Claude Code, Cursor, GitHub Copilot) auto-discover the API surface, usage patterns, and troubleshooting tips from the installed package
|
|
202
|
+
- **MCP server** — connect your AI tool to GroupDocs documentation for on-demand API lookups:
|
|
203
|
+
```json
|
|
204
|
+
{ "mcpServers": { "groupdocs-docs": { "url": "https://docs.groupdocs.com/mcp" } } }
|
|
205
|
+
```
|
|
206
|
+
- **Machine-readable docs** — full documentation available as plain text for RAG and LLM context:
|
|
207
|
+
- Single file: `https://docs.groupdocs.com/annotation/python-net/llms-full.txt`
|
|
208
|
+
- Per page: append `.md` to any docs URL
|
|
209
|
+
|
|
210
|
+
## Evaluation Mode
|
|
211
|
+
|
|
212
|
+
The API works without a license in evaluation mode, with these limitations:
|
|
213
|
+
- Output is restricted: PDF output carries an evaluation watermark and other formats show an equivalent evaluation mark.
|
|
214
|
+
- A page/document-count cap applies to processed documents.
|
|
215
|
+
|
|
216
|
+
To remove these limitations, apply a license or request a [temporary license](https://purchase.groupdocs.com/temporary-license):
|
|
217
|
+
|
|
218
|
+
```python
|
|
219
|
+
from groupdocs.annotation import License
|
|
220
|
+
License().set_license("path/to/license.lic")
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Or set the environment variable (auto-applied at import):
|
|
224
|
+
```bash
|
|
225
|
+
export GROUPDOCS_LIC_PATH="path/to/license.lic"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Troubleshooting
|
|
229
|
+
|
|
230
|
+
| Issue | Platform | Fix |
|
|
231
|
+
|---|---|---|
|
|
232
|
+
| Evaluation watermark on output | All | Apply a license — `License().set_license(...)` or set `GROUPDOCS_LIC_PATH` |
|
|
233
|
+
| `System.Drawing.Common is not supported` | Linux/macOS | `apt-get install libgdiplus` (Linux) or `brew install mono-libgdiplus` (macOS) |
|
|
234
|
+
| `The type initializer for 'Gdip' threw an exception` | macOS | `brew install mono-libgdiplus` |
|
|
235
|
+
| Garbled text / missing fonts in output | Linux | `apt-get install ttf-mscorefonts-installer fontconfig && fc-cache -f` |
|
|
236
|
+
| `DOTNET_SYSTEM_GLOBALIZATION_INVARIANT` errors | Linux | Do NOT set this variable. ICU must be available. |
|
|
237
|
+
|
|
238
|
+
## System Requirements
|
|
239
|
+
|
|
240
|
+
- Python 3.5 - 3.14
|
|
241
|
+
- Windows x64/x86, Linux x64, macOS x64/ARM64
|
|
242
|
+
- No additional software required
|
|
243
|
+
|
|
244
|
+
## More Resources
|
|
245
|
+
|
|
246
|
+
- [Documentation](https://docs.groupdocs.com/annotation/python-net/)
|
|
247
|
+
- [Code Examples](https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-Python-via-.NET)
|
|
248
|
+
- [Free Support Forum](https://forum.groupdocs.com/c/annotation)
|
|
249
|
+
- [Temporary License](https://purchase.groupdocs.com/temporary-license)
|
|
250
|
+
|
|
251
|
+
Also available for other platforms:
|
|
252
|
+
[.NET](https://products.groupdocs.com/annotation/net/) | [Java](https://products.groupdocs.com/annotation/java/) | [Node.js](https://products.groupdocs.com/annotation/nodejs-java/)
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
[Product Page](https://products.groupdocs.com/annotation/python-net/) | [Docs](https://docs.groupdocs.com/annotation/python-net/) | [Demos](https://products.groupdocs.app/annotation/family) | [API Reference](https://reference.groupdocs.com/annotation/python-net/) | [Blog](https://blog.groupdocs.com/category/annotation/) | [Free Support](https://forum.groupdocs.com/c/annotation) | [Temporary License](https://purchase.groupdocs.com/temporary-license)
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
groupdocs_annotation_net-0.0.0.dist-info/METADATA,sha256=j0z61lMeoAc_bGL5Ko-K-MUC5rjvjmubPd7TSjhRpfw,12073
|
|
2
|
+
groupdocs_annotation_net-0.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
3
|
+
groupdocs_annotation_net-0.0.0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
4
|
+
groupdocs_annotation_net-0.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|