Missing Tools to Implement
Based on the Nutrient API documentation, the following tools are missing and should be added:
High Priority PDF Processing Tools
Document Generation Tools
Form and Annotation Tools
Conversion Tools
pdf_converter - General PDF conversion
office_to_pdf - Convert Office documents (DOC, DOCX, XLS, XLSX, PPT, PPTX, RTF, ODT)
image_to_pdf - Convert images (JPG, PNG, TIFF, HEIC, WebP, SVG, GIF, TGA, EPS)
html_to_pdf - Convert HTML to PDF
pdf_to_image - Convert PDF to images
office_to_image - Convert Office documents to images
html_to_image - Convert HTML to images
pdf_to_office - Convert PDF to Office formats
image_to_office - Convert images to Office formats
html_to_office - Convert HTML to Office formats
Optimization and Archive Tools
Data Extraction Tools
Security Tools
AI Tools
Implementation Guidelines
For each new tool, follow this pattern:
Add method to DirectAPIMixin in src/nutrient_dws/api/direct.py:
def tool_name (
self ,
input_file : FileInput ,
output_path : Optional [str ] = None ,
** tool_specific_params ,
) -> Optional [bytes ]:
"""Tool description."""
return self ._process_file ("api-tool-name" , input_file , output_path , ** options )
Add builder API support - tools should automatically work with builder pattern via _process_file
Add comprehensive tests in tests/unit/ and tests/integration/
Update documentation with examples and parameter descriptions
Follow existing patterns for:
Error handling (AuthenticationError, APIError)
File handling (FileInput type)
Parameter validation
Type hints and docstrings
Tool Name Mapping
The Python method names should be snake_case versions of the API tool names:
API: split-pdf → Python: split_pdf
API: office-to-pdf → Python: office_to_pdf
API: pdf-to-pdf-a → Python: pdf_to_pdf_a
Notes
All tools should support the same file input types: str (path), bytes, or file-like objects
All tools should support optional output_path parameter
Consider adding input format validation where appropriate
Some tools may need special handling for multiple file inputs/outputs
Refer to the OpenAPI spec for exact parameter names and types
Missing Tools to Implement
Based on the Nutrient API documentation, the following tools are missing and should be added:
High Priority PDF Processing Tools
Document Generation Tools
Form and Annotation Tools
Conversion Tools
Optimization and Archive Tools
Data Extraction Tools
Security Tools
AI Tools
Implementation Guidelines
For each new tool, follow this pattern:
Add method to
DirectAPIMixininsrc/nutrient_dws/api/direct.py:Add builder API support - tools should automatically work with builder pattern via
_process_fileAdd comprehensive tests in
tests/unit/andtests/integration/Update documentation with examples and parameter descriptions
Follow existing patterns for:
Tool Name Mapping
The Python method names should be snake_case versions of the API tool names:
split-pdf→ Python:split_pdfoffice-to-pdf→ Python:office_to_pdfpdf-to-pdf-a→ Python:pdf_to_pdf_aNotes
str(path),bytes, or file-like objectsoutput_pathparameter