SDK Versions
Documentation Version: 6.1 (December 8, 2025)
This documentation is based on the following SDK versions:
Python SDK
- Repository: pdfdancer-client-python
- Version: 0.3.2
- Commit:
96504f66253180d8ae09fa409c4c07e40f33f5e1 - Commit Date: December 8, 2025
- Commit Message: Merge remote-tracking branch 'refs/remotes/origin/main'
- Documentation Coverage:
- ✅ Anonymous token support (automatic fallback authentication)
- ✅ Snapshot API (
get_document_snapshot(),get_page_snapshot(),page.get_snapshot()) - ✅ Vector graphics drawing (
new_path(),new_line(),new_bezier(),new_rectangle()) - ✅ Text line editing (
textline.edit().replace(), font, color, move) - ✅ Document-level text selection methods (
select_paragraphs_starting_with,select_paragraphs_matching,select_text_lines_starting_with,select_text_lines_matching) - ✅ Page moving and reordering (
move_page(),page.move_to()) - ✅ Adding new pages to existing documents (
new_page()) - ✅ Select all elements helper (
select_elements()) - ✅ Page size and orientation properties (
page.page_size,page.orientation) - ✅ Context manager pattern for text editing (recommended approach)
- ✅ Standard page numbering (
page_numberinstead ofpage_index) - ✅ Redaction API (
object.redact(),pdf.redact()for batch redaction)
- Key Changes Since Last Version (0.3.1 → 0.3.2):
- Document-level regex text line selection: New
select_text_lines_matching(pattern)andselect_text_line_matching(pattern)methods at document level
- Document-level regex text line selection: New
TypeScript SDK
- Repository: pdfdancer-client-typescript
- Version: 2.0.2
- Commit:
57b67d8d9e252db3db7d3f055c755ec9a872405a - Commit Date: December 8, 2025
- Documentation Coverage:
- ✅ Anonymous token support (automatic fallback authentication)
- ✅ Snapshot API (
getDocumentSnapshot(),getPageSnapshot(),page.getSnapshot()) - ✅ Vector graphics drawing (
newPath(),newLine(),newBezier(),newRectangle()) - ✅ Text line editing (
textline.edit().replace(), font, color, move) - ✅ Document-level text selection methods (
selectParagraphsStartingWith,selectParagraphsMatching,selectTextLinesStartingWith,selectTextLinesMatching) - ✅ Page moving and reordering (
movePage(),page.moveTo()) - ✅ Select all elements helper (
selectElements()) - ✅ Page size and orientation properties (
page.pageSize,page.orientation) - ✅ Form field selection naming clarified (document-level:
selectFieldsByName(), page-level:selectFormFieldsByName()) - ✅ Corrected method name:
getBytes()(notgetPdfFile()) - ✅ Standard page numbering (
pageNumberinstead ofpageIndex) - ✅ Flexible PDF input types (File, ArrayBuffer, filepath string, Uint8Array)
- ✅ Automatic dotenv loading
- ✅ Redaction API (
object.redact(),pdf.redact()for batch redaction)
- Key Changes Since Last Version (2.0.1 → 2.0.2):
- Public batch redaction API:
pdf.redact(objects, options)now exposed as public method for efficient multi-object redaction
- Public batch redaction API:
Java SDK
- Repository: pdfdancer-client-java
- Version: 0.2.2
- Commit:
df394c19717dd1e6de4ac5dd4d7a36d16c4537a9 - Commit Date: December 8, 2025
- Commit Message: build: bump version to 0.2.2
- Documentation Coverage:
- ✅ Core PDF manipulation (open, create, save)
- ✅ Text operations (paragraphs, text lines)
- ✅ Text line editing (
textLine.edit().replace(), font, color, move) - ✅ Text line selection (
selectTextLinesMatching(),selectTextLineMatching()) - ✅ Image operations (add, select, manipulate)
- ✅ Form field operations (AcroForms)
- ✅ Vector graphics (paths, lines, rectangles, Bezier curves)
- ✅ Page operations (add, delete, move, reorder)
- ✅ Snapshot API (document and page snapshots, caching)
- ✅ Session management (SessionService)
- ✅ Standard PDF fonts constants (StandardFonts enum)
- ✅ Page size constants (PageSize class with standard sizes)
- ✅ Position and coordinate system support
- ✅ Color model support
- ✅ Maven Central publishing support (automated and manual bundle upload)
- ✅ OpenAPI specification for REST API integration
- ✅ Standard page numbering (
pageNumberinstead ofpageIndex) - ✅ Redaction API (
object.redact().apply(),pdf.redact(objects)for batch redaction) - ✅ selectFormFieldByName at document and page level
- Requirements:
- Java 11+ required (tested with Java 11, 17, 21, 23, 25)
- Uses Gradle for build management
- Jackson for JSON serialization
- SLF4J for logging
- Key Features:
- Package:
com.pdfdancer.client.rest - Type-safe API: Strong typing with Java generics
- Builder pattern: Fluent API for constructing PDF elements
- Standard constants: PageSize and StandardFonts enums for common values
- Clean API design: Mirrors Python and TypeScript SDKs with Java conventions
- Default API endpoint: Now uses
https://api.pdfdancer.com - Maven Central distribution: Published artifacts available for easy dependency management
- Package:
- Key Changes Since Last Version (0.2.1 → 0.2.2):
- Simplified redaction API: Both single-object and batch redaction now use direct method calls
- Single-object:
object.redact(),object.redact(replacement),object.redact(placeholderColor),object.redact(replacement, placeholderColor)- no longer requires.apply() - Batch redaction:
pdf.redact(objects),pdf.redact(objects, replacement),pdf.redact(objects, replacement, placeholderColor)- no longer requiresRedactRequest.builder()
- Single-object:
- Simplified redaction API: Both single-object and batch redaction now use direct method calls
Checking Your Installed Version
To verify which version of the SDK you have installed:
- Python
- TypeScript
- Java
pip show pdfdancer-client-python
Or in Python code:
import pdfdancer
print(pdfdancer.__version__)
npm list pdfdancer-client-typescript
Or check your package.json:
cat package.json | grep pdfdancer-client-typescript
Check your build.gradle.kts or pom.xml:
Gradle:
cat build.gradle.kts | grep pdfdancer
Maven:
cat pom.xml | grep pdfdancer
Updating to Latest Version
- Python
- TypeScript
- Java
pip install --upgrade pdfdancer-client-python
npm update pdfdancer-client-typescript
Or with pnpm:
pnpm update pdfdancer-client-typescript
Or with Yarn:
yarn upgrade pdfdancer-client-typescript
Gradle:
Update the version in your build.gradle.kts:
dependencies {
implementation("com.pdfdancer.client:pdfdancer-client-java:0.2.2")
}
Then run:
./gradlew build --refresh-dependencies
Maven:
Update the version in your pom.xml:
<dependency>
<groupId>com.pdfdancer.client</groupId>
<artifactId>pdfdancer-client-java</artifactId>
<version>0.2.2</version>
</dependency>
Then run:
mvn clean install -U
Documentation Update History
Version 6.1 - December 8, 2025
Java Redaction API Simplification & TypeScript Version Update
Updated documentation to reflect simplified Java redaction API in v0.2.2 and TypeScript SDK version bump to 2.0.3:
SDK Version Updates:
- TypeScript SDK: 2.0.2 → 2.0.3 (version bump only, no functional changes)
- Java SDK: No version change, but documented unreleased API improvements from commit
886ff0b
API Changes (Java SDK):
- Simplified Single-Object Redaction
- Old API (fluent builder):
object.redact().withReplacement("[TEXT]").apply() - New API (direct call):
object.redact("[TEXT]") - Also available:
object.redact(),object.redact(color),object.redact(replacement, color) - No longer requires calling
.apply()- returnsbooleandirectly
- Old API (fluent builder):
Documentation Updated:
docs/redaction.md- Updated all Java code examples for single-object redactiondocs/sdk-versions.md- Updated Java SDK changelog and TypeScript version info
Files Modified:
- All Java redaction examples now use simplified API:
object.redact()instead ofobject.redact().apply()
Version 6.0 - December 8, 2025
Simplified Batch Redaction API & Document-Level Text Line Matching
Updated documentation to cover new features in Python SDK v0.3.2, TypeScript SDK v2.0.2, and Java SDK v0.2.2:
API Improvements:
-
Unified Batch Redaction API (All SDKs)
- All SDKs now support
pdf.redact(objects)for batch redaction with consistent API - TypeScript:
pdf.redact(objects, options)now public (was internal) - Java: Simplified from
RedactRequest.builder()pattern to directpdf.redact(objects, replacement, color)calls - Updated batch redaction examples in
docs/redaction.md
- All SDKs now support
-
Python: Document-Level Text Line Pattern Matching
- New
pdf.select_text_lines_matching(pattern)method at document level - New
pdf.select_text_line_matching(pattern)singular method at document level - Previously only available at page level
- New
Documentation Updated:
docs/redaction.md- Updated batch redaction examples for TypeScript and Javadocs/finding-content.md- Addedselect_text_lines_atsingular method to tabledocs/sdk-versions.md- Updated version information and changelog
SDK Versions:
- Python SDK: 0.3.1 → 0.3.2
- TypeScript SDK: 2.0.1 → 2.0.2
- Java SDK: 0.2.1 → 0.2.2
Version 5.0 - December 2, 2025
Redaction Support: Permanently Remove Sensitive Content
Updated documentation to cover redaction features available in Python SDK v0.3.1, TypeScript SDK v2.0.1, and Java SDK v0.2.1:
New Documentation Added:
- Redaction Page (
docs/redaction.md- NEW FILE)- Complete documentation for redaction functionality
- Single-object redaction:
paragraph.redact(),textline.redact(),image.redact(),path.redact(),formfield.redact() - Batch redaction:
pdf.redact(objects, replacement, placeholder_color) - Custom replacement text for text content
- Custom placeholder colors for images and paths
- Code examples in Python, TypeScript, and Java
SDK Updates:
- Python SDK: 0.3.0 → 0.3.1
- TypeScript SDK: 2.0.0 → 2.0.1
- Java SDK: 0.2.0 → 0.2.1
Internal Improvements (not user-facing):
- All SDKs now send X-PDFDancer-Client header with version information
- Java SDK: Increased default HTTP timeout to 60 seconds
- Java SDK: Added
selectFormFieldByName()at document and page level
Files Modified:
docs/redaction.md- NEW FILE (complete redaction API documentation)docs/sdk-versions.md- Version information and changelog updatedsidebars.ts- Added redaction page to Forms & Advanced category
Version 4.0 - November 25, 2025
API V1 Migration: Breaking Changes for Page Indexing
Updated documentation to reflect major breaking changes in all SDKs:
Breaking Changes:
-
Standard Page Numbering (All SDKs)
- Page numbers now use standard numbering (page 1 is the first page)
page(0)→page(1)for the first page- All documentation examples updated
-
Renamed Properties and Methods
- Python:
page_index→page_number,position.page_index→position.page_number - TypeScript:
pageIndex→pageNumber,position.pageIndex→position.pageNumber - Java:
getPageIndex()→getPageNumber(),pageIndex→pageNumber
- Python:
-
Removed Features
- Python: Removed
line_spacing()method fromTextLineEdit(only supported on paragraphs)
- Python: Removed
New Features:
-
TypeScript: Flexible PDF Input Types
PDFDancer.open()now acceptsFile,ArrayBuffer, filepath strings, andUint8Array
-
TypeScript: Automatic dotenv Support
- Environment variables automatically loaded from
.envfiles
- Environment variables automatically loaded from
Files Modified:
- All documentation files updated for Standard page numbering
docs/sdk-versions.md- Version information updated- Code samples across all 20+ documentation files updated
Version 3.0 - October 30, 2025
Major SDK Update: New Features Documentation
Updated documentation to cover all features available in Python SDK v0.2.21 and TypeScript SDK v1.0.15:
New Documentation Added:
-
Anonymous Token Support (
docs/getting-started.md)- Documented automatic anonymous token fallback
- Positioned as the easiest way for beginners to get started
- Authentication priority: direct token → PDFDANCER_TOKEN env var → automatic anonymous token
- Updated "Quick Start" section to show no-token-required examples
- Added "Using API Tokens (Production)" section for production use cases
-
Snapshot API (
docs/working-with-snapshots.md- NEW FILE)- Complete documentation for snapshot functionality
- Document snapshots:
get_document_snapshot()/getDocumentSnapshot() - Page snapshots:
get_page_snapshot()/getPageSnapshot(),page.get_snapshot()/page.getSnapshot() - Filtering by object type
- Use cases: bulk text extraction, document analysis
- Performance benefits and caching behavior
-
Vector Graphics Drawing (
docs/working-with-vector-graphics.md)- Major expansion from selection-only to full drawing capabilities
- Drawing lines:
new_line()/newLine()with stroke color, width, dash patterns - Drawing rectangles:
new_rectangle()/newRectangle()with stroke and fill - Drawing Bezier curves:
new_bezier()/newBezier()for smooth curves - Drawing complex paths:
new_path()/newPath()with move_to, line_to, curve_to, close_path - Complete styling options documentation (stroke, fill, dash patterns)
-
Text Line Editing (
docs/working-with-text.md)- New section: "Editing Text Lines"
- Text line replacement:
textline.edit().replace() - Font and style changes for text lines
- Moving text lines to new positions
- Context manager pattern for text lines (Python)
- Comparison of text lines vs paragraphs
Files Modified:
docs/getting-started.md- Anonymous token support, updated quick startdocs/working-with-snapshots.md- NEW FILE (complete snapshot API documentation)docs/working-with-vector-graphics.md- Added 4 major sections for drawing capabilitiesdocs/working-with-text.md- Added text line editing sectiondocs/sdk-versions.md- Updated to Python 0.2.21 and TypeScript 1.0.15
Version 2.0 - October 30, 2025
Comprehensive SDK Feature Documentation Update
Updated documentation to cover all features available in Python SDK v0.2.16 and TypeScript SDK v1.0.13:
New Documentation Added:
-
Document-Level Text Selection (
docs/finding-content.md)- Clarified that text selection methods work at both document and page levels
- Added examples showing document-level vs page-scoped searches
- Methods:
select_paragraphs_starting_with(),select_paragraphs_matching(),select_text_lines_starting_with(),select_text_lines_matching()
-
Select All Elements Helper (
docs/finding-content.md)- New section documenting
select_elements()convenience method - Returns all content types at once (paragraphs, text lines, images, paths, forms, form fields)
- Available at both document and page levels
- New section documenting
-
Page Moving and Reordering (
docs/working-with-pages.md)- New section: "Moving and Reordering Pages"
- Python:
pdf.move_page(from_index, to_index)andpage.move_to(target_index) - TypeScript:
pdf.movePage(pageIndex, targetPageIndex)andpage.moveTo(targetPageIndex)
-
Adding Pages to Existing Documents (
docs/working-with-pages.md)- New section: "Adding Pages to Existing Documents"
- Python:
pdf.new_page()method - TypeScript:
pdf.newPage()method
-
Page Size and Orientation Properties (
docs/working-with-pages.md)- Enhanced "Getting Page Properties" section
- Python:
page.page_size(orpage.size),page.orientation(orpage.page_orientation) - TypeScript:
page.pageSize,page.orientation
-
Python Context Manager Pattern (
docs/working-with-text.md)- Promoted from tip box to main example
- Recommended approach for text editing operations
- Automatic application of changes with error safety
Bug Fixes:
-
TypeScript Method Name Correction (
docs/working-with-pages.md)- Fixed:
getPdfFile()→getBytes()
- Fixed:
-
Form Field Selection Naming (
docs/working-with-acroforms.md)- Clarified naming difference between document-level and page-level methods
- Document-level:
selectFieldsByName() - Page-level:
selectFormFieldsByName()
Files Modified:
docs/finding-content.md- 3 sections updateddocs/working-with-pages.md- 2 new sections, 1 section enhanced, 1 bug fixdocs/working-with-acroforms.md- 1 section enhanceddocs/working-with-text.md- 2 sections enhanced