Skip to content

Commit 2e433dd

Browse files
committed
Update to version 4.3.0 on 2026-10-31
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes. - New: Word templates (`template_type` `docx`). create_template makes one from a Word document (.docx, up to 50 MB) that you upload and pass as a `cache_id`, or pass as a `document_url` or `document_base64`; upload_template takes the file itself. update_template_document and upload_template_document replace its document the same ways. Each tag in the document, such as `{{ customer.name }}`, becomes a field. Each of them takes an OpenDocument text file (.odt) too, which DocSpring converts to a Word document. - New: a Word template's `output_format`, what its submissions make unless they set `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file) or `pdf`. create_template and upload_template require it, and update_template changes it. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. - New: the `docx` and `odt` output formats, a Word template's filled-in Word document (`files.docx`) and OpenDocument file (`files.odt`, converted from the Word document). Add them to `output_formats` in create_submission or create_submission_batch to get more than one file, such as the Word document and the PDF. - generate_submission_files takes `pdf`, the PDF of a Word template's submission that didn't make one (converted from its Word document), `docx`, the Word document of one that made only its PDF (made again from its data and the template version it used), and `odt`, its OpenDocument file. None of them uses credits again. Until the new file is ready, its `state` in `files` is `pending`, and when it couldn't be made, its `error_message` says why. - A Word template's `document` is its Word document: `document.permanent_url` downloads it. Its `state` is `processed` once it's uploaded or downloaded (`downloading` or `download_failed` while a `document_url` downloads, `converting` or `conversion_failed` while an OpenDocument file is converted), and get_template_diff's `document_changed` says whether it was edited. - get_template_page_images returns a 409 for a Word template, whose pages are only laid out when a document is made. - create_template_preview previews Word templates too: images of the pages of the PDF that the template's Word document makes with your data. A DocSpring server that can't convert Word documents to PDF returns a 409.
1 parent fc818d9 commit 2e433dd

379 files changed

Lines changed: 1973 additions & 971 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ keeps it.
9090

9191
- List methods return `data` and `next_cursor`: pass `next_cursor` as `cursor` to get the next page.
9292
- Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v2 without a new
93-
version. The model keeps a response field added to the API after this release in its additional properties (`getAdditionalProperties()`). The objects defined inside a model, such as a template's `document`, leave it out. Enum values in responses are strings, so a
94-
value added after this release comes back as it is: handle values you don't recognize.
93+
version. The model keeps a response field added to the API after this release in its additional properties (`getAdditionalProperties()`). The objects defined inside a model, such as a template's `document`, leave it out. An enum value added after this release comes
94+
back as the API sent it: handle values you don't recognize.

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
### 4.3.0 [October 31, 2026]
2+
3+
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes.
4+
- New: Word templates (`template_type` `docx`). create_template makes one from a Word document (.docx, up to 50 MB)
5+
that you upload and pass as a `cache_id`, or pass as a `document_url` or `document_base64`; upload_template takes the
6+
file itself. update_template_document and upload_template_document replace its document the same ways. Each tag in
7+
the document, such as `{{ customer.name }}`, becomes a field. Each of them takes an OpenDocument text file (.odt)
8+
too, which DocSpring converts to a Word document.
9+
- New: a Word template's `output_format`, what its submissions make unless they set `output_formats`: `docx` (a Word
10+
document), `odt` (an OpenDocument file) or `pdf`. create_template and upload_template require it, and
11+
update_template changes it. A Word template that encrypts its PDFs makes PDFs, because Word documents and
12+
OpenDocument files can't be password-protected.
13+
- New: the `docx` and `odt` output formats, a Word template's filled-in Word document (`files.docx`) and OpenDocument
14+
file (`files.odt`, converted from the Word document). Add them to `output_formats` in create_submission or
15+
create_submission_batch to get more than one file, such as the Word document and the PDF.
16+
- generate_submission_files takes `pdf`, the PDF of a Word template's submission that didn't make one (converted from
17+
its Word document), `docx`, the Word document of one that made only its PDF (made again from its data and the
18+
template version it used), and `odt`, its OpenDocument file. None of them uses credits again. Until the new file is
19+
ready, its `state` in `files` is `pending`, and when it couldn't be made, its `error_message` says why.
20+
- A Word template's `document` is its Word document: `document.permanent_url` downloads it. Its `state` is `processed`
21+
once it's uploaded or downloaded (`downloading` or `download_failed` while a `document_url` downloads, `converting`
22+
or `conversion_failed` while an OpenDocument file is converted), and get_template_diff's `document_changed` says
23+
whether it was edited.
24+
- get_template_page_images returns a 409 for a Word template, whose pages are only laid out when a document is made.
25+
- create_template_preview previews Word templates too: images of the pages of the PDF that the template's Word
26+
document makes with your data. A DocSpring server that can't convert Word documents to PDF returns a 409.
27+
128
### 4.2.0 [October 29, 2026]
229

330
- **BREAKING CHANGE**: list_templates returns a shorter `TemplateSummary`: a template's name, description, type, folder

‎README.md‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# DocSpring Java SDK
22

33
The official Java client for the [DocSpring API](https://docspring.com/docs/api/). DocSpring fills PDF
4-
templates with your data, generates PDFs from HTML templates, combines PDFs and collects e-signatures.
4+
forms with your data, generates PDFs and Word documents from HTML and Word templates, combines PDFs and collects
5+
e-signatures.
56

67
[Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
78
[Maven Central](https://central.sonatype.com/artifact/com.docspring/DocSpring) · [Changelog](https://github.com/DocSpring/docspring-java/blob/main/CHANGELOG.md)
89

910
The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
1011
pull requests are welcome.
1112

12-
Version 4.2.0. Requires Java 8 or later.
13+
Version 4.3.0. Requires Java 8 or later.
1314

1415
## Install and configure
1516

@@ -19,14 +20,14 @@ Version 4.2.0. Requires Java 8 or later.
1920
<dependency>
2021
<groupId>com.docspring</groupId>
2122
<artifactId>DocSpring</artifactId>
22-
<version>4.2.0</version>
23+
<version>4.3.0</version>
2324
</dependency>
2425
```
2526

2627
**Gradle**: add to your `build.gradle`:
2728

2829
```groovy
29-
implementation 'com.docspring:DocSpring:4.2.0'
30+
implementation 'com.docspring:DocSpring:4.3.0'
3031
```
3132

3233
Configure authentication via environment variables:
@@ -161,11 +162,11 @@ Java code for every method.
161162
| [`testAuthentication`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#testauthentication) | Test authentication |
162163
| [`updateSignatureRequest`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#updatesignaturerequest) | Update a signature request |
163164
| [`updateTemplate`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#updatetemplate) | Update a template |
164-
| [`updateTemplateDocument`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#updatetemplatedocument) | Replace a template's PDF |
165+
| [`updateTemplateDocument`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#updatetemplatedocument) | Replace a template's document |
165166
| [`updateTemplateFields`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#updatetemplatefields) | Update a template's fields |
166167
| [`updateWebhook`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#updatewebhook) | Update a webhook |
167-
| [`uploadTemplate`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#uploadtemplate) | Create a PDF template from an uploaded PDF |
168-
| [`uploadTemplateDocument`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#uploadtemplatedocument) | Replace a template's PDF with an uploaded PDF |
168+
| [`uploadTemplate`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#uploadtemplate) | Create a template from an uploaded PDF or Word document |
169+
| [`uploadTemplateDocument`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#uploadtemplatedocument) | Replace a template's document with an uploaded file |
169170
| [`validateSubmission`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#validatesubmission) | Check a submission without creating it |
170171

171172
## Errors
@@ -183,7 +184,7 @@ existing code, such as removing or renaming a field, go in a new API version
183184
responses that are newer than it is:
184185

185186
- The model keeps a response field added to the API after this release in its additional properties (`getAdditionalProperties()`). The objects defined inside a model, such as a template's `document`, leave it out.
186-
- Enum values in responses are strings, so a value added to the API after this release comes back as it is: handle values you don't recognize.
187+
- An enum value added to the API after this release comes back as the API sent it: handle values you don't recognize.
187188

188189
Upgrade the SDK to read new fields and enum values. The [changelog](https://github.com/DocSpring/docspring-java/blob/main/CHANGELOG.md) lists
189190
what each release adds.

0 commit comments

Comments
 (0)