pdfdancer-client-python 0.2.29__tar.gz → 0.3.2__tar.gz
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.
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.github/workflows/ci.yml +4 -3
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.gitignore +1 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/CLAUDE.md +2 -2
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/PKG-INFO +4 -4
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/README.md +3 -3
- pdfdancer_client_python-0.3.2/docs/api-schemas/v0.yml +4945 -0
- pdfdancer_client_python-0.2.29/docs/openapi.yml → pdfdancer_client_python-0.3.2/docs/api-schemas/v1.yml +1433 -1006
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/pyproject.toml +1 -1
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/__init__.py +4 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/image_builder.py +3 -3
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/models.py +72 -23
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/page_builder.py +37 -11
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/paragraph_builder.py +12 -12
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/path_builder.py +17 -17
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/pdfdancer_v1.py +205 -96
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/text_line_builder.py +9 -9
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/types.py +29 -31
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/PKG-INFO +4 -4
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/SOURCES.txt +3 -1
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/pdf_assertions.py +42 -42
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_acroform.py +6 -6
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_bezier_builder.py +21 -21
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_context_manager.py +26 -26
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_form_x_objects.py +2 -2
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_image.py +10 -10
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_line.py +10 -13
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_line_builder.py +27 -27
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_new_pdf.py +5 -5
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_page.py +15 -16
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_paragraph.py +57 -59
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_path.py +6 -6
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_path_builder.py +48 -48
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_path_builder_rectangle.py +63 -63
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_path_comprehensive.py +18 -18
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_rectangle_builder.py +49 -49
- pdfdancer_client_python-0.3.2/tests/e2e/test_redact.py +287 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_singular_selection.py +38 -39
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_snapshot.py +37 -35
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_text_line_edit.py +17 -41
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_models.py +10 -10
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_openapi_compliance.py +4 -4
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_path_models.py +4 -4
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_pdf_object_equality.py +23 -23
- pdfdancer_client_python-0.3.2/update-api-spec.sh +5 -0
- pdfdancer_client_python-0.2.29/update-api-spec.sh +0 -3
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.claude/commands/discuss.md +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.flake8 +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/.github/workflows/daily-tests.yml +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/LICENSE +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/NOTICE +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/TODO.md +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/check.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/media/logo-orange-512h.webp +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/media/logo-orange-60h.webp +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/release.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/setup.cfg +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/exceptions.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer/fingerprint.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/dependency_links.txt +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/requires.txt +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/src/pdfdancer_client_python.egg-info/top_level.txt +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/test.sh +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/__init__.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/conftest.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/__init__.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_pdfdancer.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/e2e/test_positioning.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/DancingScript-Regular.ttf +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/Empty.pdf +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/JetBrainsMono-Regular.ttf +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/Showcase.pdf +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/basic-paths.pdf +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/form-xobject-example.pdf +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/logo-80.png +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/fixtures/mixed-form-types.pdf +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_anonymous_token.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_fingerprint.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_rate_limit.py +0 -0
- {pdfdancer_client_python-0.2.29 → pdfdancer_client_python-0.3.2}/tests/test_standard_fonts.py +0 -0
|
@@ -2,9 +2,9 @@ name: CI
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches: [
|
|
5
|
+
branches: [ '**' ]
|
|
6
6
|
pull_request:
|
|
7
|
-
branches: [
|
|
7
|
+
branches: [ '**' ]
|
|
8
8
|
workflow_dispatch:
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
@@ -14,7 +14,7 @@ jobs:
|
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
strategy:
|
|
16
16
|
fail-fast: false
|
|
17
|
-
max-parallel:
|
|
17
|
+
max-parallel: 2
|
|
18
18
|
matrix:
|
|
19
19
|
python-version: [ '3.12' ]
|
|
20
20
|
|
|
@@ -57,6 +57,7 @@ jobs:
|
|
|
57
57
|
runs-on: ${{ matrix.os }}
|
|
58
58
|
strategy:
|
|
59
59
|
fail-fast: false
|
|
60
|
+
max-parallel: 2
|
|
60
61
|
matrix:
|
|
61
62
|
os: [ ubuntu-latest, windows-latest ]
|
|
62
63
|
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
|
|
@@ -83,7 +83,7 @@ pdf.save("output.pdf")
|
|
|
83
83
|
- **Dual initialization**: `PDFDancer.open()` for existing PDFs, `PDFDancer.new()` for blank PDFs
|
|
84
84
|
- **Session-based operations**: All constructors create server session automatically
|
|
85
85
|
- **Object-oriented API**: Selected objects (paragraphs, images, etc.) have methods like `.delete()`, `.move()`
|
|
86
|
-
- **Page-level operations**: `pdf.page(
|
|
86
|
+
- **Page-level operations**: `pdf.page(number)` provides page-scoped selections and operations
|
|
87
87
|
- **Builder pattern**: `new_paragraph()` and `new_image()` for fluent construction
|
|
88
88
|
- **Strict validation**: All validation matches Java client exactly
|
|
89
89
|
- **Exception handling**: FontNotFoundException, ValidationException, HttpClientException, etc.
|
|
@@ -188,7 +188,7 @@ page.delete()
|
|
|
188
188
|
### API Design
|
|
189
189
|
|
|
190
190
|
- **Use object-oriented patterns**: Selected objects should have methods (`.delete()`, `.move()`, etc.)
|
|
191
|
-
- **Provide page-level operations**: `pdf.page(
|
|
191
|
+
- **Provide page-level operations**: `pdf.page(number)` for page-scoped selections
|
|
192
192
|
- **Support fluent builders**: `new_paragraph()` and `new_image()` return builder instances
|
|
193
193
|
- **Use snake_case for methods**: `select_paragraphs()`, `select_images_at()`, etc.
|
|
194
194
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pdfdancer-client-python
|
|
3
|
-
Version: 0.2
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Python client for PDFDancer API
|
|
5
5
|
Author-email: "The Famous Cat Ltd." <hi@thefamouscat.com>
|
|
6
6
|
License:
|
|
@@ -251,7 +251,7 @@ pixel-perfect control from Python. The same API is also available for TypeScript
|
|
|
251
251
|
|
|
252
252
|
## Highlights
|
|
253
253
|
|
|
254
|
-
- Locate paragraphs, text lines, images, vector paths, form fields, and pages by
|
|
254
|
+
- Locate paragraphs, text lines, images, vector paths, form fields, and pages by page number, coordinates, or text prefixes.
|
|
255
255
|
- Edit existing content in place with fluent editors and context managers that apply changes safely.
|
|
256
256
|
- Programmatically control third-party PDFs—modify invoices, contracts, and reports you did not author.
|
|
257
257
|
- Add content with precise XY positioning using paragraph and image builders, custom fonts, and color helpers.
|
|
@@ -300,7 +300,7 @@ with PDFDancer.open(
|
|
|
300
300
|
.font(StandardFonts.HELVETICA, 12) \
|
|
301
301
|
.color(Color(70, 70, 70)) \
|
|
302
302
|
.line_spacing(1.4) \
|
|
303
|
-
.at(
|
|
303
|
+
.at(page_number=1, x=72, y=520) \
|
|
304
304
|
.add()
|
|
305
305
|
|
|
306
306
|
# Persist the modified document
|
|
@@ -321,7 +321,7 @@ with PDFDancer.new(token="your-api-token") as pdf:
|
|
|
321
321
|
.font(StandardFonts.TIMES_BOLD, 18) \
|
|
322
322
|
.color(Color(10, 10, 80)) \
|
|
323
323
|
.line_spacing(1.2) \
|
|
324
|
-
.at(
|
|
324
|
+
.at(page_number=1, x=72, y=730) \
|
|
325
325
|
.add()
|
|
326
326
|
|
|
327
327
|
pdf.new_image() \
|
|
@@ -12,7 +12,7 @@ pixel-perfect control from Python. The same API is also available for TypeScript
|
|
|
12
12
|
|
|
13
13
|
## Highlights
|
|
14
14
|
|
|
15
|
-
- Locate paragraphs, text lines, images, vector paths, form fields, and pages by
|
|
15
|
+
- Locate paragraphs, text lines, images, vector paths, form fields, and pages by page number, coordinates, or text prefixes.
|
|
16
16
|
- Edit existing content in place with fluent editors and context managers that apply changes safely.
|
|
17
17
|
- Programmatically control third-party PDFs—modify invoices, contracts, and reports you did not author.
|
|
18
18
|
- Add content with precise XY positioning using paragraph and image builders, custom fonts, and color helpers.
|
|
@@ -61,7 +61,7 @@ with PDFDancer.open(
|
|
|
61
61
|
.font(StandardFonts.HELVETICA, 12) \
|
|
62
62
|
.color(Color(70, 70, 70)) \
|
|
63
63
|
.line_spacing(1.4) \
|
|
64
|
-
.at(
|
|
64
|
+
.at(page_number=1, x=72, y=520) \
|
|
65
65
|
.add()
|
|
66
66
|
|
|
67
67
|
# Persist the modified document
|
|
@@ -82,7 +82,7 @@ with PDFDancer.new(token="your-api-token") as pdf:
|
|
|
82
82
|
.font(StandardFonts.TIMES_BOLD, 18) \
|
|
83
83
|
.color(Color(10, 10, 80)) \
|
|
84
84
|
.line_spacing(1.2) \
|
|
85
|
-
.at(
|
|
85
|
+
.at(page_number=1, x=72, y=730) \
|
|
86
86
|
.add()
|
|
87
87
|
|
|
88
88
|
pdf.new_image() \
|