muban-cli 1.8.2__tar.gz → 1.9.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.
Files changed (74) hide show
  1. {muban_cli-1.8.2 → muban_cli-1.9.2}/.gitignore +2 -1
  2. {muban_cli-1.8.2 → muban_cli-1.9.2}/.gitlab-ci.yml +0 -7
  3. {muban_cli-1.8.2/muban_cli.egg-info → muban_cli-1.9.2}/PKG-INFO +12 -8
  4. {muban_cli-1.8.2 → muban_cli-1.9.2}/README.md +8 -3
  5. {muban_cli-1.8.2 → muban_cli-1.9.2}/docs/muban-openapi-spec-v1.json +176 -45
  6. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/__init__.py +1 -1
  7. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/api/client.py +2 -1
  8. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/api/templates.py +5 -1
  9. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/async_ops.py +1 -1
  10. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/generate.py +10 -1
  11. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/resources.py +6 -6
  12. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/dialogs/export_options_dialog.py +49 -2
  13. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/main_window.py +1 -1
  14. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/tabs/generate_tab.py +45 -10
  15. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/tabs/server_info_tab.py +7 -2
  16. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/packager.py +44 -0
  17. {muban_cli-1.8.2 → muban_cli-1.9.2/muban_cli.egg-info}/PKG-INFO +12 -8
  18. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli.egg-info/requires.txt +2 -2
  19. {muban_cli-1.8.2 → muban_cli-1.9.2}/pyproject.toml +6 -7
  20. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/test_gui.py +13 -9
  21. {muban_cli-1.8.2 → muban_cli-1.9.2}/LICENSE +0 -0
  22. {muban_cli-1.8.2 → muban_cli-1.9.2}/docs/MUBAN_CLI_CONCEPT.md +0 -0
  23. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/__main__.py +0 -0
  24. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/api/__init__.py +0 -0
  25. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/api/_http.py +0 -0
  26. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/api/admin.py +0 -0
  27. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/api/async_ops.py +0 -0
  28. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/api/audit.py +0 -0
  29. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/api/users.py +0 -0
  30. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/api.py +0 -0
  31. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/auth.py +0 -0
  32. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/cli.py +0 -0
  33. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/__init__.py +0 -0
  34. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/admin.py +0 -0
  35. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/audit.py +0 -0
  36. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/auth.py +0 -0
  37. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/package.py +0 -0
  38. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/settings.py +0 -0
  39. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/tags.py +0 -0
  40. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/templates.py +0 -0
  41. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/commands/users.py +0 -0
  42. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/config.py +0 -0
  43. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/exceptions.py +0 -0
  44. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/__init__.py +0 -0
  45. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/dialogs/__init__.py +0 -0
  46. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/dialogs/data_editor_dialog.py +0 -0
  47. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/dialogs/font_dialog.py +0 -0
  48. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/dialogs/tags_dialog.py +0 -0
  49. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/dialogs/upload_dialog.py +0 -0
  50. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/error_dialog.py +0 -0
  51. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/icons.py +0 -0
  52. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/main.py +0 -0
  53. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/resources/logo.png +0 -0
  54. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/tabs/__init__.py +0 -0
  55. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/tabs/package_tab.py +0 -0
  56. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/tabs/settings_tab.py +0 -0
  57. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/gui/tabs/templates_tab.py +0 -0
  58. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/py.typed +0 -0
  59. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli/utils.py +0 -0
  60. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli.egg-info/SOURCES.txt +0 -0
  61. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli.egg-info/dependency_links.txt +0 -0
  62. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli.egg-info/entry_points.txt +0 -0
  63. {muban_cli-1.8.2 → muban_cli-1.9.2}/muban_cli.egg-info/top_level.txt +0 -0
  64. {muban_cli-1.8.2 → muban_cli-1.9.2}/setup.cfg +0 -0
  65. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/__init__.py +0 -0
  66. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/conftest.py +0 -0
  67. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/test_api.py +0 -0
  68. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/test_auth.py +0 -0
  69. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/test_cli_simple.py +0 -0
  70. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/test_commands.py +0 -0
  71. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/test_config.py +0 -0
  72. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/test_exceptions.py +0 -0
  73. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/test_packager.py +0 -0
  74. {muban_cli-1.8.2 → muban_cli-1.9.2}/tests/test_utils.py +0 -0
@@ -10,4 +10,5 @@ __pycache__/
10
10
  # Build artifacts
11
11
  build/
12
12
  dist/
13
- *.egg-info/
13
+ *.egg-info/
14
+ *.spec
@@ -10,7 +10,6 @@ cache:
10
10
  key: ${CI_COMMIT_REF_SLUG}
11
11
  paths:
12
12
  - .cache/pip
13
- - .venv/
14
13
 
15
14
  # Test job - runs on all branches
16
15
  test:
@@ -88,12 +87,6 @@ test:coverage:
88
87
  script:
89
88
  - xvfb-run -a pytest tests/ -v --tb=short
90
89
 
91
- test:py39:
92
- extends: .test-matrix
93
- image: python:3.9-slim
94
- rules:
95
- - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
96
-
97
90
  test:py310:
98
91
  extends: .test-matrix
99
92
  image: python:3.10-slim
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: muban-cli
3
- Version: 1.8.2
3
+ Version: 1.9.2
4
4
  Summary: Command-line interface for Muban Document Generation Service
5
5
  Author-email: Muban Team <contact@muban.me>
6
6
  Maintainer-email: Muban Team <contact@muban.me>
@@ -14,19 +14,18 @@ Classifier: Intended Audience :: Developers
14
14
  Classifier: Intended Audience :: System Administrators
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
21
  Classifier: Topic :: Text Processing :: Markup
23
22
  Classifier: Topic :: Utilities
24
- Requires-Python: >=3.9
23
+ Requires-Python: >=3.10
25
24
  Description-Content-Type: text/markdown
26
25
  License-File: LICENSE
27
26
  Requires-Dist: click>=8.0.0
28
- Requires-Dist: requests>=2.25.0
29
- Requires-Dist: urllib3>=2.0.0
27
+ Requires-Dist: requests>=2.33.0
28
+ Requires-Dist: urllib3>=2.7.0
30
29
  Provides-Extra: dev
31
30
  Requires-Dist: pytest>=7.0.0; extra == "dev"
32
31
  Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
@@ -60,7 +59,7 @@ A robust command-line interface for the **Muban Document Generation Service**. M
60
59
  - **Template Management** - List, upload, download, and delete templates (JRXML and DOCX)
61
60
  - **Tag Management** - Organize templates with key-value tags, filter by tags
62
61
  - **Template Packaging** - Package JRXML or DOCX templates with auto-detected image assets and optional fonts into deployable ZIP packages
63
- - **Document Generation** - Generate PDF, XLSX, DOCX, RTF, HTML, and TXT documents
62
+ - **Document Generation** - Generate PDF, XLSX, DOCX, RTF, HTML, TXT, and PNG documents
64
63
  - **Async Processing** - Submit bulk document generation jobs and monitor progress
65
64
  - **Search & Filter** - Search templates and filter by tags or audit logs
66
65
  - **Audit & Monitoring** - Access audit logs and security dashboards (admin)
@@ -413,9 +412,13 @@ muban generate TEMPLATE_ID -p title="Report" -p year=2025 -p amount=15750.25
413
412
  # Different output formats
414
413
  muban generate TEMPLATE_ID -F xlsx -o report.xlsx
415
414
  muban generate TEMPLATE_ID -F docx -o report.docx
416
- muban generate TEMPLATE_ID -F html -o report.html
415
+ muban generate TEMPLATE_ID -F html -o report.zip
417
416
  muban generate TEMPLATE_ID -F txt -o report.txt
418
417
 
418
+ # PNG output (returns ZIP with page images)
419
+ muban generate TEMPLATE_ID -F png -o pages.zip
420
+ muban generate TEMPLATE_ID -F png --png-zoom 2.0 -o pages.zip # Double resolution
421
+
419
422
  # Using parameter file
420
423
  muban generate TEMPLATE_ID --params-file params.json
421
424
 
@@ -714,7 +717,7 @@ The GUI provides a tabbed interface with the following sections:
714
717
 
715
718
  #### **⚙️ Generate Tab**
716
719
 
717
- - Select template and output format (PDF, XLSX, DOCX, RTF, HTML, TXT)
720
+ - Select template and output format (PDF, XLSX, DOCX, RTF, HTML, TXT, PNG)
718
721
  - Fill in template parameters with a dynamic form
719
722
  - Load full request JSON from file (parameters, data, and export options in one step)
720
723
  - **Copy Request JSON** — copy the assembled request body to clipboard for debugging or reuse
@@ -724,6 +727,7 @@ The GUI provides a tabbed interface with the following sections:
724
727
  - **General options**: Document locale for number/date/currency formatting, ignore pagination for continuous output
725
728
  - **PDF options**: PDF/A compliance, embedded ICC profiles, password protection, permission settings, duplex padding, image compression quality, flatten transparency, font embedding substitute, CMYK conversion profile (dropdown from server ICC profiles)
726
729
  - **HTML options**: Resource embedding, single-file output, custom CSS
730
+ - **PNG options**: Zoom ratio for output resolution
727
731
  - **TXT options**: Character grid dimensions, page size in characters, line/page separators, trailing whitespace trimming
728
732
  - Save generated documents to local filesystem
729
733
 
@@ -12,7 +12,7 @@ A robust command-line interface for the **Muban Document Generation Service**. M
12
12
  - **Template Management** - List, upload, download, and delete templates (JRXML and DOCX)
13
13
  - **Tag Management** - Organize templates with key-value tags, filter by tags
14
14
  - **Template Packaging** - Package JRXML or DOCX templates with auto-detected image assets and optional fonts into deployable ZIP packages
15
- - **Document Generation** - Generate PDF, XLSX, DOCX, RTF, HTML, and TXT documents
15
+ - **Document Generation** - Generate PDF, XLSX, DOCX, RTF, HTML, TXT, and PNG documents
16
16
  - **Async Processing** - Submit bulk document generation jobs and monitor progress
17
17
  - **Search & Filter** - Search templates and filter by tags or audit logs
18
18
  - **Audit & Monitoring** - Access audit logs and security dashboards (admin)
@@ -365,9 +365,13 @@ muban generate TEMPLATE_ID -p title="Report" -p year=2025 -p amount=15750.25
365
365
  # Different output formats
366
366
  muban generate TEMPLATE_ID -F xlsx -o report.xlsx
367
367
  muban generate TEMPLATE_ID -F docx -o report.docx
368
- muban generate TEMPLATE_ID -F html -o report.html
368
+ muban generate TEMPLATE_ID -F html -o report.zip
369
369
  muban generate TEMPLATE_ID -F txt -o report.txt
370
370
 
371
+ # PNG output (returns ZIP with page images)
372
+ muban generate TEMPLATE_ID -F png -o pages.zip
373
+ muban generate TEMPLATE_ID -F png --png-zoom 2.0 -o pages.zip # Double resolution
374
+
371
375
  # Using parameter file
372
376
  muban generate TEMPLATE_ID --params-file params.json
373
377
 
@@ -666,7 +670,7 @@ The GUI provides a tabbed interface with the following sections:
666
670
 
667
671
  #### **⚙️ Generate Tab**
668
672
 
669
- - Select template and output format (PDF, XLSX, DOCX, RTF, HTML, TXT)
673
+ - Select template and output format (PDF, XLSX, DOCX, RTF, HTML, TXT, PNG)
670
674
  - Fill in template parameters with a dynamic form
671
675
  - Load full request JSON from file (parameters, data, and export options in one step)
672
676
  - **Copy Request JSON** — copy the assembled request body to clipboard for debugging or reuse
@@ -676,6 +680,7 @@ The GUI provides a tabbed interface with the following sections:
676
680
  - **General options**: Document locale for number/date/currency formatting, ignore pagination for continuous output
677
681
  - **PDF options**: PDF/A compliance, embedded ICC profiles, password protection, permission settings, duplex padding, image compression quality, flatten transparency, font embedding substitute, CMYK conversion profile (dropdown from server ICC profiles)
678
682
  - **HTML options**: Resource embedding, single-file output, custom CSS
683
+ - **PNG options**: Zoom ratio for output resolution
679
684
  - **TXT options**: Character grid dimensions, page size in characters, line/page separators, trailing whitespace trimming
680
685
  - Save generated documents to local filesystem
681
686
 
@@ -11,7 +11,7 @@
11
11
  "license": {
12
12
  "name": "S-MIT (Selective MIT)"
13
13
  },
14
- "version": "1.14.0"
14
+ "version": "1.17.0"
15
15
  },
16
16
  "servers": [
17
17
  {
@@ -64,6 +64,10 @@
64
64
  {
65
65
  "name": "Templates",
66
66
  "description": "Document template management and generation"
67
+ },
68
+ {
69
+ "name": "Document Post-Processing",
70
+ "description": "Post-processing operations on existing documents"
67
71
  }
68
72
  ],
69
73
  "paths": {
@@ -1162,7 +1166,7 @@
1162
1166
  {
1163
1167
  "name": "format",
1164
1168
  "in": "path",
1165
- "description": "Output format (pdf, xlsx, docx, rtf, html, txt)",
1169
+ "description": "Output format (pdf, xlsx, docx, rtf, html, txt, png)",
1166
1170
  "required": true,
1167
1171
  "schema": {
1168
1172
  "type": "string"
@@ -1308,6 +1312,97 @@
1308
1312
  }
1309
1313
  }
1310
1314
  },
1315
+ "/api/v1/documents/post-process/pdf": {
1316
+ "post": {
1317
+ "tags": [
1318
+ "Document Post-Processing"
1319
+ ],
1320
+ "summary": "Post-process PDF document",
1321
+ "description": "Apply post-processing operations to an existing PDF file: font embedding, image compression, CMYK colour conversion, transparency flattening, PDF/A conformance, duplex padding, and encryption. Operations use the same pipeline as document generation. The input file is not stored permanently.",
1322
+ "operationId": "postProcessPdf",
1323
+ "parameters": [
1324
+ {
1325
+ "name": "filename",
1326
+ "in": "query",
1327
+ "description": "Desired filename for the response (optional, .pdf extension ensured)",
1328
+ "required": false,
1329
+ "schema": {
1330
+ "type": "string"
1331
+ }
1332
+ }
1333
+ ],
1334
+ "requestBody": {
1335
+ "content": {
1336
+ "multipart/form-data": {
1337
+ "schema": {
1338
+ "required": [
1339
+ "file",
1340
+ "options"
1341
+ ],
1342
+ "type": "object",
1343
+ "properties": {
1344
+ "file": {
1345
+ "type": "string",
1346
+ "description": "PDF file to post-process",
1347
+ "format": "binary"
1348
+ },
1349
+ "options": {
1350
+ "type": "string",
1351
+ "description": "Post-processing options JSON (same schema as pdfExportOptions in generation)"
1352
+ }
1353
+ }
1354
+ }
1355
+ }
1356
+ }
1357
+ },
1358
+ "responses": {
1359
+ "200": {
1360
+ "description": "PDF post-processed successfully",
1361
+ "content": {
1362
+ "*/*": {
1363
+ "schema": {
1364
+ "type": "string",
1365
+ "format": "binary"
1366
+ }
1367
+ }
1368
+ }
1369
+ },
1370
+ "400": {
1371
+ "description": "Invalid input — not a PDF file or invalid options",
1372
+ "content": {
1373
+ "*/*": {
1374
+ "schema": {
1375
+ "type": "string",
1376
+ "format": "binary"
1377
+ }
1378
+ }
1379
+ }
1380
+ },
1381
+ "413": {
1382
+ "description": "File too large",
1383
+ "content": {
1384
+ "*/*": {
1385
+ "schema": {
1386
+ "type": "string",
1387
+ "format": "binary"
1388
+ }
1389
+ }
1390
+ }
1391
+ },
1392
+ "401": {
1393
+ "description": "Unauthorized",
1394
+ "content": {
1395
+ "*/*": {
1396
+ "schema": {
1397
+ "type": "string",
1398
+ "format": "binary"
1399
+ }
1400
+ }
1401
+ }
1402
+ }
1403
+ }
1404
+ }
1405
+ },
1311
1406
  "/api/v1/auth/refresh": {
1312
1407
  "post": {
1313
1408
  "tags": [
@@ -1503,22 +1598,22 @@
1503
1598
  "required": true
1504
1599
  },
1505
1600
  "responses": {
1506
- "200": {
1507
- "description": "Bulk submission processed (check response for individual failures)",
1601
+ "400": {
1602
+ "description": "Invalid request format",
1508
1603
  "content": {
1509
1604
  "*/*": {
1510
1605
  "schema": {
1511
- "$ref": "#/components/schemas/BulkAsyncResponseDto"
1606
+ "$ref": "#/components/schemas/ApiResponseDtoBulkAsyncResponseDto"
1512
1607
  }
1513
1608
  }
1514
1609
  }
1515
1610
  },
1516
- "400": {
1517
- "description": "Invalid request format",
1611
+ "200": {
1612
+ "description": "Bulk submission processed (check response for individual failures)",
1518
1613
  "content": {
1519
1614
  "*/*": {
1520
1615
  "schema": {
1521
- "$ref": "#/components/schemas/ApiResponseDtoBulkAsyncResponseDto"
1616
+ "$ref": "#/components/schemas/BulkAsyncResponseDto"
1522
1617
  }
1523
1618
  }
1524
1619
  }
@@ -1592,22 +1687,22 @@
1592
1687
  }
1593
1688
  }
1594
1689
  },
1595
- "200": {
1596
- "description": "Integrity verified successfully - file is unchanged",
1690
+ "403": {
1691
+ "description": "Forbidden - admin role required",
1597
1692
  "content": {
1598
1693
  "*/*": {
1599
1694
  "schema": {
1600
- "$ref": "#/components/schemas/ApiResponseDto"
1695
+ "$ref": "#/components/schemas/ApiResponseDtoString"
1601
1696
  }
1602
1697
  }
1603
1698
  }
1604
1699
  },
1605
- "403": {
1606
- "description": "Forbidden - admin role required",
1700
+ "200": {
1701
+ "description": "Integrity verified successfully - file is unchanged",
1607
1702
  "content": {
1608
1703
  "*/*": {
1609
1704
  "schema": {
1610
- "$ref": "#/components/schemas/ApiResponseDtoString"
1705
+ "$ref": "#/components/schemas/ApiResponseDto"
1611
1706
  }
1612
1707
  }
1613
1708
  }
@@ -1728,8 +1823,8 @@
1728
1823
  "description": "Recalculates and updates HMAC-SHA256 digests for all templates in the system. Use this operation after changing the file.integrity.secret-key configuration or when migrating templates. Returns a map with template IDs as keys and status ('SUCCESS' or error message) as values. Returns 200 for all success, 500 for all failures, or 207 Multi-Status for partial success. (Admin role required)",
1729
1824
  "operationId": "regenerateAllDigests",
1730
1825
  "responses": {
1731
- "200": {
1732
- "description": "All digests regenerated successfully",
1826
+ "500": {
1827
+ "description": "All digest regenerations failed",
1733
1828
  "content": {
1734
1829
  "*/*": {
1735
1830
  "schema": {
@@ -1738,8 +1833,8 @@
1738
1833
  }
1739
1834
  }
1740
1835
  },
1741
- "500": {
1742
- "description": "All digest regenerations failed",
1836
+ "207": {
1837
+ "description": "Multi-Status - some digests regenerated successfully, some failed",
1743
1838
  "content": {
1744
1839
  "*/*": {
1745
1840
  "schema": {
@@ -1748,22 +1843,22 @@
1748
1843
  }
1749
1844
  }
1750
1845
  },
1751
- "403": {
1752
- "description": "Forbidden - admin role required",
1846
+ "200": {
1847
+ "description": "All digests regenerated successfully",
1753
1848
  "content": {
1754
1849
  "*/*": {
1755
1850
  "schema": {
1756
- "$ref": "#/components/schemas/ApiResponseDtoMapStringString"
1851
+ "$ref": "#/components/schemas/ApiResponseDto"
1757
1852
  }
1758
1853
  }
1759
1854
  }
1760
1855
  },
1761
- "207": {
1762
- "description": "Multi-Status - some digests regenerated successfully, some failed",
1856
+ "403": {
1857
+ "description": "Forbidden - admin role required",
1763
1858
  "content": {
1764
1859
  "*/*": {
1765
1860
  "schema": {
1766
- "$ref": "#/components/schemas/ApiResponseDto"
1861
+ "$ref": "#/components/schemas/ApiResponseDtoMapStringString"
1767
1862
  }
1768
1863
  }
1769
1864
  }
@@ -2800,6 +2895,7 @@
2800
2895
  "TEMPLATE_TAGS_ADDED",
2801
2896
  "TEMPLATE_TAGS_DELETED",
2802
2897
  "TEMPLATE_TAG_KEY_DELETED",
2898
+ "DOCUMENT_POSTPROCESSED",
2803
2899
  "INTEGRITY_DIGEST_REGENERATED",
2804
2900
  "INTEGRITY_CHECK_PERFORMED",
2805
2901
  "INTEGRITY_CHECK_PASSED",
@@ -3456,18 +3552,18 @@
3456
3552
  }
3457
3553
  }
3458
3554
  },
3459
- "200": {
3460
- "description": "Result found",
3555
+ "404": {
3556
+ "description": "Request not found or not owned by user",
3461
3557
  "content": {
3462
3558
  "*/*": {
3463
3559
  "schema": {
3464
- "$ref": "#/components/schemas/AsyncResultDto"
3560
+ "$ref": "#/components/schemas/ApiResponseDtoAsyncResultDto"
3465
3561
  }
3466
3562
  }
3467
3563
  }
3468
3564
  },
3469
- "404": {
3470
- "description": "Request not found or not owned by user",
3565
+ "503": {
3566
+ "description": "Async processing not enabled or queue unavailable",
3471
3567
  "content": {
3472
3568
  "*/*": {
3473
3569
  "schema": {
@@ -3476,12 +3572,12 @@
3476
3572
  }
3477
3573
  }
3478
3574
  },
3479
- "503": {
3480
- "description": "Async processing not enabled or queue unavailable",
3575
+ "200": {
3576
+ "description": "Result found",
3481
3577
  "content": {
3482
3578
  "*/*": {
3483
3579
  "schema": {
3484
- "$ref": "#/components/schemas/ApiResponseDtoAsyncResultDto"
3580
+ "$ref": "#/components/schemas/AsyncResultDto"
3485
3581
  }
3486
3582
  }
3487
3583
  }
@@ -3592,12 +3688,6 @@
3592
3688
  }
3593
3689
  ],
3594
3690
  "responses": {
3595
- "200": {
3596
- "description": "Document downloaded successfully",
3597
- "content": {
3598
- "application/octet-stream": {}
3599
- }
3600
- },
3601
3691
  "404": {
3602
3692
  "description": "Request not found or result not in queue",
3603
3693
  "content": {
@@ -3628,6 +3718,12 @@
3628
3718
  }
3629
3719
  }
3630
3720
  },
3721
+ "200": {
3722
+ "description": "Document downloaded successfully",
3723
+ "content": {
3724
+ "application/octet-stream": {}
3725
+ }
3726
+ },
3631
3727
  "401": {
3632
3728
  "description": "Unauthorized",
3633
3729
  "content": {
@@ -3820,22 +3916,22 @@
3820
3916
  "description": "Returns queue depth, performance metrics, throughput, and error rates for async document generation",
3821
3917
  "operationId": "getMetrics",
3822
3918
  "responses": {
3823
- "200": {
3824
- "description": "Metrics retrieved successfully",
3919
+ "403": {
3920
+ "description": "Access denied - requires ROLE_ADMIN",
3825
3921
  "content": {
3826
3922
  "*/*": {
3827
3923
  "schema": {
3828
- "$ref": "#/components/schemas/AsyncMetricsDto"
3924
+ "$ref": "#/components/schemas/ApiResponseDtoAsyncMetricsDto"
3829
3925
  }
3830
3926
  }
3831
3927
  }
3832
3928
  },
3833
- "403": {
3834
- "description": "Access denied - requires ROLE_ADMIN",
3929
+ "200": {
3930
+ "description": "Metrics retrieved successfully",
3835
3931
  "content": {
3836
3932
  "*/*": {
3837
3933
  "schema": {
3838
- "$ref": "#/components/schemas/ApiResponseDtoAsyncMetricsDto"
3934
+ "$ref": "#/components/schemas/AsyncMetricsDto"
3839
3935
  }
3840
3936
  }
3841
3937
  }
@@ -4416,6 +4512,9 @@
4416
4512
  "txtExportOptions": {
4417
4513
  "$ref": "#/components/schemas/TxtExportOptionsDto"
4418
4514
  },
4515
+ "pngExportOptions": {
4516
+ "$ref": "#/components/schemas/PngExportOptionsDto"
4517
+ },
4419
4518
  "ignorePagination": {
4420
4519
  "type": "boolean",
4421
4520
  "description": "Optional pagination control. When true, ignores pagination and renders as continuous content",
@@ -4614,6 +4713,12 @@
4614
4713
  "description": "ICC profile name for converting RGB images to CMYK colour space. When set, all RGB raster images are converted to CMYK using the specified ICC colour profile for accurate print reproduction. Profile must be available in classpath:icc/. Leave empty to keep original colour space.",
4615
4714
  "example": "coated-fogra39"
4616
4715
  },
4716
+ "cmykPreserveBlack": {
4717
+ "type": "boolean",
4718
+ "description": "Use Preserve Black during RGB→CMYK conversion. When true (default), achromatic RGB sources (R==G==B in vector content; matching pixels in rasters) are mapped to K-only CMYK instead of the composite black an ICC transform would produce. Improves text sharpness on press and reduces ink consumption. Set to false to keep the legacy v1.15.6 ICC-only behaviour.",
4719
+ "example": true,
4720
+ "default": true
4721
+ },
4617
4722
  "flattenTransparency": {
4618
4723
  "type": "boolean",
4619
4724
  "description": "Remove unnecessary transparency groups from PDF pages. JasperReports/FOP often inject /Group /Transparency on every page even when no real transparency is used, slowing print RIP processing. When true, redundant transparency groups are stripped. Default is false.",
@@ -4633,6 +4738,23 @@
4633
4738
  "pdfaConformance": "PDF/A-1b"
4634
4739
  }
4635
4740
  },
4741
+ "PngExportOptionsDto": {
4742
+ "type": "object",
4743
+ "properties": {
4744
+ "zoomRatio": {
4745
+ "maximum": 4.0,
4746
+ "minimum": 0.5,
4747
+ "type": "number",
4748
+ "description": "Zoom ratio for PNG output resolution. 1.0 = native page size (~72 DPI equivalent), 2.0 = double resolution (~150 DPI), 3.0 = triple (~216 DPI). Higher values produce sharper images but larger file sizes. If omitted, defaults to 1.0.",
4749
+ "format": "float",
4750
+ "example": 2.0
4751
+ }
4752
+ },
4753
+ "description": "PNG-specific export options for controlling output image resolution",
4754
+ "example": {
4755
+ "zoomRatio": 2.0
4756
+ }
4757
+ },
4636
4758
  "TxtExportOptionsDto": {
4637
4759
  "type": "object",
4638
4760
  "properties": {
@@ -4944,7 +5066,7 @@
4944
5066
  },
4945
5067
  "format": {
4946
5068
  "type": "string",
4947
- "description": "Output format: PDF, XLSX, DOCX, RTF, HTML, TXT",
5069
+ "description": "Output format: PDF, XLSX, DOCX, RTF, HTML, TXT, PNG",
4948
5070
  "example": "PDF"
4949
5071
  },
4950
5072
  "parameters": {
@@ -5022,6 +5144,14 @@
5022
5144
  },
5023
5145
  "description": "TXT-specific export options (character grid dimensions)"
5024
5146
  },
5147
+ "pngExportOptions": {
5148
+ "type": "object",
5149
+ "additionalProperties": {
5150
+ "type": "object",
5151
+ "description": "PNG-specific export options (zoom ratio)"
5152
+ },
5153
+ "description": "PNG-specific export options (zoom ratio)"
5154
+ },
5025
5155
  "ignorePagination": {
5026
5156
  "type": "boolean",
5027
5157
  "description": "Whether to ignore pagination",
@@ -5515,6 +5645,7 @@
5515
5645
  "TEMPLATE_TAGS_ADDED",
5516
5646
  "TEMPLATE_TAGS_DELETED",
5517
5647
  "TEMPLATE_TAG_KEY_DELETED",
5648
+ "DOCUMENT_POSTPROCESSED",
5518
5649
  "INTEGRITY_DIGEST_REGENERATED",
5519
5650
  "INTEGRITY_CHECK_PERFORMED",
5520
5651
  "INTEGRITY_CHECK_PASSED",
@@ -5,6 +5,6 @@ A robust Python CLI tool for managing JasperReports templates and generating
5
5
  documents through the Muban API.
6
6
  """
7
7
 
8
- __version__ = "1.8.2"
8
+ __version__ = "1.9.2"
9
9
  __author__ = "Muban Team"
10
10
  __prog_name__ = "muban" # CLI command name for messages
@@ -127,13 +127,14 @@ class MubanAPIClient:
127
127
  pdf_export_options: Optional[Dict[str, Any]] = None,
128
128
  html_export_options: Optional[Dict[str, Any]] = None,
129
129
  txt_export_options: Optional[Dict[str, Any]] = None,
130
+ png_export_options: Optional[Dict[str, Any]] = None,
130
131
  ignore_pagination: bool = False
131
132
  ) -> Path:
132
133
  """Generate a document from a template."""
133
134
  return self.templates.generate(
134
135
  template_id, output_format, parameters, output_path, filename,
135
136
  data, document_locale, pdf_export_options, html_export_options,
136
- txt_export_options, ignore_pagination
137
+ txt_export_options, png_export_options, ignore_pagination
137
138
  )
138
139
 
139
140
  def generate_document_raw(
@@ -240,6 +240,7 @@ class TemplatesAPI:
240
240
  pdf_export_options: Optional[Dict[str, Any]] = None,
241
241
  html_export_options: Optional[Dict[str, Any]] = None,
242
242
  txt_export_options: Optional[Dict[str, Any]] = None,
243
+ png_export_options: Optional[Dict[str, Any]] = None,
243
244
  ignore_pagination: bool = False
244
245
  ) -> Path:
245
246
  """
@@ -247,7 +248,7 @@ class TemplatesAPI:
247
248
 
248
249
  Args:
249
250
  template_id: Template UUID
250
- output_format: Output format (pdf, xlsx, docx, rtf, html, txt)
251
+ output_format: Output format (pdf, xlsx, docx, rtf, html, txt, png)
251
252
  parameters: List of parameter name/value pairs
252
253
  output_path: Optional output path
253
254
  filename: Optional custom filename
@@ -256,6 +257,7 @@ class TemplatesAPI:
256
257
  pdf_export_options: PDF-specific options
257
258
  html_export_options: HTML-specific options
258
259
  txt_export_options: TXT-specific options
260
+ png_export_options: PNG-specific options (zoomRatio)
259
261
  ignore_pagination: Whether to ignore pagination
260
262
 
261
263
  Returns:
@@ -275,6 +277,8 @@ class TemplatesAPI:
275
277
  request_data["htmlExportOptions"] = html_export_options
276
278
  if txt_export_options:
277
279
  request_data["txtExportOptions"] = txt_export_options
280
+ if png_export_options:
281
+ request_data["pngExportOptions"] = png_export_options
278
282
  if ignore_pagination:
279
283
  request_data["ignorePagination"] = ignore_pagination
280
284
 
@@ -141,7 +141,7 @@ def register_async_commands(cli: click.Group) -> None:
141
141
  @common_options
142
142
  @click.option('--template', '-t', required=True, help='Template ID')
143
143
  @click.option('--doc-format', '-F', 'output_fmt', default='PDF',
144
- type=click.Choice(['PDF', 'XLSX', 'DOCX', 'RTF', 'HTML', 'TXT'], case_sensitive=False),
144
+ type=click.Choice(['PDF', 'XLSX', 'DOCX', 'RTF', 'HTML', 'TXT', 'PNG'], case_sensitive=False),
145
145
  help='Document output format')
146
146
  @click.option('--param', '-p', multiple=True, help='Parameter in name=value format')
147
147
  @click.option('--data-file', '-d', type=click.Path(exists=True, path_type=Path),