Skip to content

Commit 04e8ddd

Browse files
committed
docs: surface full list of programmatic actions
1 parent ff36894 commit 04e8ddd

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,19 @@ See: [Customize the PDF Editor and Add Branding](https://simplepdf.com/help/how-
279279

280280
Currently, page manipulation (add/remove/re-arrange/rotate) is only available through the UI. There are no programmatic APIs for these operations. If you need this feature, [file an issue on the repository](https://github.com/SimplePDF/simplepdf-embed/issues).
281281

282-
**Available programmatic navigation:**
283-
284-
```jsx
285-
// Navigate to a specific page
286-
await actions.goTo({ page: 3 });
287-
```
282+
**Available programmatic actions:**
283+
284+
| Action | Description |
285+
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
286+
| `goTo` | Navigate to a specific page |
287+
| `selectTool` | Select a tool (`TEXT`, `BOXED_TEXT`, `CHECKBOX`, `PICTURE`, `SIGNATURE`) or `null` for cursor |
288+
| `createField` | Create a field at a specified position |
289+
| `clearFields` | Clear fields by ID, by page, or all fields |
290+
| `getDocumentContent` | Extract text content from the document |
291+
| `submit` | Submit the document (with optional device download) |
292+
| `loadDocument` (Iframe)| Load a document programmatically (Iframe API only) |
293+
294+
See full documentation: [React](./react/README.md#programmatic-control) | [Iframe](./documentation/IFRAME.md#incoming-events-sent-to-the-iframe)
288295

289296
# Get started
290297

web/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,7 @@ window.simplePDF.setConfig({
165165
To use SimplePDF as a PDF viewer with all editing features disabled:
166166

167167
```html
168-
<script
169-
src="https://unpkg.com/@simplepdf/web-embed-pdf"
170-
companyIdentifier="viewer"
171-
defer
172-
></script>
168+
<script src="https://unpkg.com/@simplepdf/web-embed-pdf" companyIdentifier="viewer" defer></script>
173169
```
174170

175171
Or programmatically:

0 commit comments

Comments
 (0)