mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
docs: section-prefix tool API endpoints
This commit is contained in:
@@ -8,7 +8,7 @@ Convert PDF pages to high-quality raster images. Supports page selection, multip
|
||||
|
||||
## API Endpoint
|
||||
|
||||
`POST /api/v1/tools/pdf-to-image`
|
||||
`POST /api/v1/tools/pdf/pdf-to-image`
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -23,7 +23,7 @@ Convert PDF pages to high-quality raster images. Supports page selection, multip
|
||||
## Example Request
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/pdf-to-image \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/pdf/pdf-to-image \
|
||||
-F "file=@document.pdf" \
|
||||
-F 'settings={"format":"png","dpi":300,"pages":"1-3","colorMode":"color"}'
|
||||
```
|
||||
@@ -60,14 +60,14 @@ curl -X POST http://localhost:1349/api/v1/tools/pdf-to-image \
|
||||
|
||||
## Info Sub-Route
|
||||
|
||||
`POST /api/v1/tools/pdf-to-image/info`
|
||||
`POST /api/v1/tools/pdf/pdf-to-image/info`
|
||||
|
||||
Returns the page count of a PDF without rendering any pages.
|
||||
|
||||
### Info Request
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/pdf-to-image/info \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/pdf/pdf-to-image/info \
|
||||
-F "file=@document.pdf"
|
||||
```
|
||||
|
||||
@@ -81,14 +81,14 @@ curl -X POST http://localhost:1349/api/v1/tools/pdf-to-image/info \
|
||||
|
||||
## Preview Sub-Route
|
||||
|
||||
`POST /api/v1/tools/pdf-to-image/preview`
|
||||
`POST /api/v1/tools/pdf/pdf-to-image/preview`
|
||||
|
||||
Returns low-resolution JPEG thumbnails of all pages as base64 data URLs. Useful for building a page selection UI.
|
||||
|
||||
### Preview Request
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/pdf-to-image/preview \
|
||||
curl -X POST http://localhost:1349/api/v1/tools/pdf/pdf-to-image/preview \
|
||||
-F "file=@document.pdf"
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user