JSON API - watermark
watermark
PREMIUM
TRIAL / ADVANCED
Inserts a watermark into an Excel spreadsheet.
Note
You are reading the JSON API documentation. For the PHP API method please go to watermark.
JSON data
| Key | Description |
|---|---|
| document | Excel file to insert the watermark into. Path to the local document, Base64 string, or URL. |
| type | Watermark type: "text" or "image". |
| colSize | Number of cols. Default as 6. |
| rowSize | Number of rows. Default as 6. |
| position | Cell position. Default as 'F15'. |
| rotation | 60.000ths of a degree. Default as 315. |
| transparency | 0 to 100. Default as 60. |
If "type" is "image":
| Key | Description |
|---|---|
| image | Path to the local image, Base64 string, or URL. |
If "type" is "text":
| Key | Type | Description |
|---|---|---|
| text | The string of text used for watermarking. Default as 'DRAFT'. | |
| backgroundColor | FFFF00, CCCCCC..., none. Default as "none". | |
| color | Hexadecimal value or color name. Default as "7D7F7C". | |
| fontSize | 8, 9, 10, 11 ... Default as 60. |
Code samples
Example #1
Example #2
Release notes
- phpxlsx 6.0:
- new action.