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
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"homepage": "https://www.cloudpdf.com"
}
},
"originGitCommit": "20cebe429411ef5019c9e31fc7841d72b7fb98a8",
"originGitCommit": "e5cd0731cb3a1f2ed5821f8d60191bd58934c3dd",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0-alpha.8",
"requestedVersion": "3.0.0-alpha.9",
"ciProvider": "github",
"sdkVersion": "3.0.0-alpha.8"
"sdkVersion": "3.0.0-alpha.9"
}
8 changes: 4 additions & 4 deletions cloudpdf-generation.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"language": "php",
"canonicalVersion": "3.0.0-next.8",
"sdkVersion": "3.0.0-alpha.8",
"canonicalVersion": "3.0.0-next.9",
"sdkVersion": "3.0.0-alpha.9",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "e997d51317662fe0666e6582916ded9b17a8bcd225c178548e1ff226e4d01c6d",
"gitCommit": "20cebe429411ef5019c9e31fc7841d72b7fb98a8",
"openapiSha256": "4ee27900dbb0b13408ce00a0e80d606444ab81e9d5a76186fa984c8c8dfe09fe",
"gitCommit": "e5cd0731cb3a1f2ed5821f8d60191bd58934c3dd",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
250 changes: 250 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2776,6 +2776,94 @@ $client->doc->pages->delete(
</dl>


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

<details><summary><code>$client-&gt;doc-&gt;pages-&gt;extract($docId, $layerName, $request) -> string</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>

```php
$client->doc->pages->extract(
'docId',
'layerName',
new ExtractPagesRequest([
'body' => [
'string' => [
'key' => "value",
],
],
]),
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**$docId:** `string`

</dd>
</dl>

<dl>
<dd>

**$layerName:** `string`

</dd>
</dl>

<dl>
<dd>

**$documentPassword:** `?string` — 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:** `array`

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


</dd>
</dl>
</details>
Expand Down Expand Up @@ -2848,6 +2936,168 @@ $client->doc->pages->flatten(
</dl>


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

<details><summary><code>$client-&gt;doc-&gt;pages-&gt;insert($docId, $layerName, $request) -> ?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>

```php
$client->doc->pages->insert(
'docId',
'layerName',
new InsertPagesRequest([
'file' => File::createFromString("example_file", "example_file"),
]),
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**$docId:** `string`

</dd>
</dl>

<dl>
<dd>

**$layerName:** `string`

</dd>
</dl>

<dl>
<dd>

**$documentPassword:** `?string` — 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>
</dd>
</dl>


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

<details><summary><code>$client-&gt;doc-&gt;pages-&gt;insertBlank($docId, $layerName, $request) -> ?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>

```php
$client->doc->pages->insertBlank(
'docId',
'layerName',
new InsertBlankPagesRequest([
'body' => [
'key' => "value",
],
]),
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**$docId:** `string`

</dd>
</dl>

<dl>
<dd>

**$layerName:** `string`

</dd>
</dl>

<dl>
<dd>

**$documentPassword:** `?string` — 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:** `array`

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


</dd>
</dl>
</details>
Expand Down
4 changes: 2 additions & 2 deletions src/CloudPDFClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public function __construct(
$defaultHeaders = [
'X-Fern-Language' => 'PHP',
'X-Fern-SDK-Name' => 'CloudPDF',
'X-Fern-SDK-Version' => '3.0.0-alpha.8',
'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.8',
'X-Fern-SDK-Version' => '3.0.0-alpha.9',
'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.9',
];
if ($token != null) {
$defaultHeaders['Authorization'] = "Bearer $token";
Expand Down
Loading
Loading