Skip to content

Commit

Permalink
Merge branch 'refs/heads/watermark_tech_doc' into pdfembed_ADA_compli…
Browse files Browse the repository at this point in the history
…ance-and-faq
  • Loading branch information
mahour committed Jun 21, 2024
2 parents 0bf29c8 + 53af7ee commit 7cfc6e2
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,11 @@ export const onRouteUpdate = ({ location, prevLocation }) => {
) {
pageHeadTittle = "PDF Electronic Seal API Prerequisites";
}
}else if (window.location.pathname.indexOf("overview/") >= 0) {
} else if (
window.location.pathname.indexOf("overview/") >= 0
) {
pageHeadTittle = "Overview Introduction";
}
}
if (pageHeadTittle != null) {
document
.querySelector("footer")
Expand Down
4 changes: 4 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ module.exports = {
{
title: 'PDF Electronic Seal',
path: 'overview/pdf-services-api/howtos/electronic-seal-api.md'
},
{
title: 'PDF Watermark',
path: 'overview/pdf-services-api/howtos/pdf-watermark-api.md'
}
]
}
Expand Down
80 changes: 80 additions & 0 deletions src/pages/overview/pdf-services-api/howtos/pdf-watermark-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: PDF Watermark | How Tos | PDF Services API | Adobe PDF Services
---
<InlineAlert slots="text"/>

PDF Watermark is currently accessible through the REST API only.

# PDF Watermark

A watermark in a document is usually semi-translucent or faded text, a logo, or a pattern placed in the background or foreground of the page for security, authenticity, and branding.

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

![PDF Watermark](../watermark_overview.png)

## Input Documents : **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.

### 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.

## 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*) : Specifies the placement of the watermark on the page. It can appear in the foreground or background. The default value is true, placing the watermark in the foreground.
* **Opacity** (*opacity*) : Specifies the opacity of the watermark, represented as an integer percentage value ranging from 0 to 100. The default value is 100.

## REST API

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.

Please refer the [API usage guide](../gettingstarted.md) to understand how to use our APIs.

<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
}
}'
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7cfc6e2

Please sign in to comment.