Skip to content

Commit

Permalink
implement howtos and review
Browse files Browse the repository at this point in the history
  • Loading branch information
Himakshi Salhotra authored and Himakshi Salhotra committed May 31, 2024
1 parent 549b8fd commit 2928c4f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 23 deletions.
Binary file modified src/pages/overview/images/watermark_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/pages/overview/pdf-watermark-api/gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ curl --location -g --request PUT 'https://dcplatformstorageservice-prod-us-east-
```
<InlineAlert slots="text"/>

For PDF Watermark API, you need to specify an additional required document i.e. a source watermark document. Step 4 can be repeated for uploading this document.
For PDF Watermark API, you need to specify an additional required document i.e. an input watermark document. Step 4 can be repeated for uploading this document.


## Step 3 : Creating the job
Expand Down
65 changes: 45 additions & 20 deletions src/pages/overview/pdf-watermark-api/howtos_watermark-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,30 @@ title: How Tos | PDF Watermark API | Adobe PDF Services
---
# PDF Watermark API

## Input Parameters
## Input Parameters : **Required**
Supported format is PDF (application/pdf). Input PDF with version 1.6 and above is supported.

### Input Document

A PDF document to which a watermark will be applied. The maximum size of the PDF cannot exceed 100 MB.
A PDF document to which a watermark will be applied.

### Watermark Document

A PDF document whose first page will be used as a watermark for the input document. The output generated will retain the content along with the watermark from the first page.
A PDF document whose first page will be used as a watermark for the input document.
The output generated will retain the content along with the watermark from the first page.

## Watermark Parameters

### Page ranges (_pageRanges_)

Specifies the number of pages on which the watermark will be applied. Page numbers are indexed from 1 to N.
The page ranges are specified as an array of objects whose length cannot exceed beyond 20. Each object has the following properties:
* **Start Page** (*start*) : The first page number of the range. Default value is 1.
* **End Page** (*end*) : The last page number of the range. Default value is the last page of the document.


### Appearance (_appearance_)
* **Foreground** (*appearOnForeground*)
* **opacity** (*opacity*)
* **Foreground** (*appearOnForeground*) : Specifies the placement of the watermark on the page. It can appear in the foreground or background. The default value is false, placing the watermark in the background.
* **Opacity** (*opacity*) : Specifies the opacity of the watermark, represented as an integer percentage value ranging from 0 to 100. The default value is 100.

**Example JSON**

Expand All @@ -33,10 +38,6 @@ A PDF document whose first page will be used as a watermark for the input docume
{
"start": 3,
"end": 7
},
{
"start": 9,
"end": 15
}
],
"appearance" : {
Expand All @@ -45,16 +46,40 @@ A PDF document whose first page will be used as a watermark for the input docume
}
}
```
## API limitations

<br />

- **Input PDF size:** Input PDF files up to a maximum of 100 MB are supported. ??
- **Input Document format:** Supported format is PDF(application/pdf).
- **Password-protected Files:** Encrypted or Password-protected PDFs are not supported for applying watermark.
- **Input PDF version:** Input PDF with version less than 1.3 are not supported. ????
- **Usage Rights File:** Input PDF having usage rights are not supported. ???

## REST API

See our public API Reference for [PDF Watermark API](../../../apis/#tag/PDF-Watermark).
See our public API Reference for [PDF Watermark API](../../../apis/#tag/PDF-Watermark).

## Apply Watermark on specified pages

The sample below performs watermark operation applying watermark in foreground on specified pages of a given PDF.

<CodeBlock slots="heading, code" repeat="1" languages="REST API" />

#### REST API

```javascript
curl --location --request POST 'https://pdf-services.adobe.io/operation/addwatermark' \
--header 'x-api-key: {{Placeholder for client_id}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{Placeholder for token}}' \
--data-raw '{
"inputDocumentAssetID": "urn:aaid:AS:UE1:54cbf87f-d7f5-4918-8e4b-9f68",
"watermarkDocumentAssetID": "urn:aaid:AS:UE1:54cbf87f-d7f5-4918-8e4b-9f1878678e68",
"pageRanges": [
{
"start": 2,
"end": 5
},
{
"start": 8,
"end": 10
}
],
"appearance": {
"opacity": 50,
"appearOnForeground": true
}
}'
```
3 changes: 1 addition & 2 deletions src/pages/overview/pdf-watermark-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ title: PDF Watermark API | Adobe PDF Services

## What is PDF Watermark API ?

A watermark in a document is usually semi-translucent or faded text, a logo, an image, or a pattern placed in the background or foreground of the page.
Watermarks are commonly used in a wide range of document types like Contracts, legal documents, certificates, confidential documents etc for security, authenticity, and branding.
A watermark in a document is usually semi-translucent or faded text, a logo, an image, or a pattern placed in the background or foreground of the page. Watermarks are commonly used in a wide range of document types like Contracts, legal documents, certificates, confidential documents etc for security, authenticity, and branding.

PDF Watermark API is a cloud based solution to apply a watermark on specified pages of PDF document using a source file.

Expand Down

0 comments on commit 2928c4f

Please sign in to comment.