Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"client_class_name": "CloudPDFClient",
"environment_class_name": "CloudPDFEnvironment"
},
"originGitCommit": "20cebe429411ef5019c9e31fc7841d72b7fb98a8",
"originGitCommit": "e5cd0731cb3a1f2ed5821f8d60191bd58934c3dd",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0a8",
"requestedVersion": "3.0.0a9",
"ciProvider": "github"
}
8 changes: 4 additions & 4 deletions cloudpdf-generation.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"language": "python",
"canonicalVersion": "3.0.0-next.8",
"sdkVersion": "3.0.0a8",
"canonicalVersion": "3.0.0-next.9",
"sdkVersion": "3.0.0a9",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "e997d51317662fe0666e6582916ded9b17a8bcd225c178548e1ff226e4d01c6d",
"gitCommit": "20cebe429411ef5019c9e31fc7841d72b7fb98a8",
"openapiSha256": "4ee27900dbb0b13408ce00a0e80d606444ab81e9d5a76186fa984c8c8dfe09fe",
"gitCommit": "e5cd0731cb3a1f2ed5821f8d60191bd58934c3dd",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "cloudpdf"
version = "3.0.0a8"
version = "3.0.0a9"
description = "The official Python SDK for the CloudPDF API."
readme = "README.md"
authors = ["CloudPDF <hello@cloudpdf.com>"]
Expand Down
298 changes: 298 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3403,6 +3403,106 @@ client.doc.pages.delete(
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.doc.pages.<a href="src/cloudpdf/doc/pages/client.py">extract</a>(...) -> typing.Iterator[bytes]</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

A read, not a mutation: the source document is untouched and no event is published. Body is `{"pageObjectNumbers": number[]}`; the response body is the new PDF.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from cloudpdf import CloudPDFClient

client = CloudPDFClient(
token="<token>",
base_url="https://yourhost.com/path/to/api",
)

client.doc.pages.extract(
doc_id="docId",
layer_name="layerName",
request={
"string": {"key": "value"}
},
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**doc_id:** `str`

</dd>
</dl>

<dl>
<dd>

**layer_name:** `str`

</dd>
</dl>

<dl>
<dd>

**request:** `DocPagesExtractRequest`

</dd>
</dl>

<dl>
<dd>

**document_password:** `typing.Optional[str]` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down Expand Up @@ -3489,6 +3589,204 @@ client.doc.pages.flatten(
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.doc.pages.<a href="src/cloudpdf/doc/pages/client.py">insert</a>(...) -> DocPagesInsert200Response</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Multipart mutation envelope: a `body` field holding `{"destIndex"?: number}` (omitted → append) plus a `resource:source` file part carrying the standalone PDF whose pages are copied in. The inserted copies get fresh page object numbers, returned in insertion order.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from cloudpdf import CloudPDFClient

client = CloudPDFClient(
token="<token>",
base_url="https://yourhost.com/path/to/api",
)

client.doc.pages.insert(
doc_id="docId",
layer_name="layerName",
file="example_file",
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**doc_id:** `str`

</dd>
</dl>

<dl>
<dd>

**layer_name:** `str`

</dd>
</dl>

<dl>
<dd>

**file:** `core.File`

</dd>
</dl>

<dl>
<dd>

**document_password:** `typing.Optional[str]` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.doc.pages.<a href="src/cloudpdf/doc/pages/client.py">insert_blank</a>(...) -> DocPagesInsertBlank200Response</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Body is `{"size": {"width", "height"}, "count"?, "destIndex"?}` — size in PDF points, count in [1, 100], destIndex omitted → append.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from cloudpdf import CloudPDFClient

client = CloudPDFClient(
token="<token>",
base_url="https://yourhost.com/path/to/api",
)

client.doc.pages.insert_blank(
doc_id="docId",
layer_name="layerName",
request={
"key": "value"
},
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**doc_id:** `str`

</dd>
</dl>

<dl>
<dd>

**layer_name:** `str`

</dd>
</dl>

<dl>
<dd>

**request:** `DocPagesInsertBlankRequest`

</dd>
</dl>

<dl>
<dd>

**document_password:** `typing.Optional[str]` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down
Loading
Loading