{"id":8997,"date":"2024-08-31T01:46:09","date_gmt":"2024-08-30T20:16:09","guid":{"rendered":"https:\/\/www.satup.xyz\/index.php\/2024\/08\/31\/introducing-the-adobe-pdf-watermark-api-by-raymond-camden-jul-2024\/"},"modified":"2024-08-31T01:46:09","modified_gmt":"2024-08-30T20:16:09","slug":"introducing-the-adobe-pdf-watermark-api-by-raymond-camden-jul-2024","status":"publish","type":"post","link":"https:\/\/www.satup.xyz\/index.php\/2024\/08\/31\/introducing-the-adobe-pdf-watermark-api-by-raymond-camden-jul-2024\/","title":{"rendered":"Introducing the Adobe PDF Watermark API | by Raymond Camden | Jul, 2024"},"content":{"rendered":"<p><br \/>\n<\/p>\n<div>\n<div>\n<div>\n<div class=\"speechify-ignore ab cp\">\n<div class=\"speechify-ignore bh l\">\n<div class=\"hv hw hx hy hz ab\">\n<div>\n<div class=\"ab ia\"><a href=\"https:\/\/medium.com\/@cfjedimaster?source=post_page-----0591982e6000--------------------------------\" rel=\"noopener follow\"><\/p>\n<div>\n<div class=\"bm\" aria-hidden=\"false\">\n<div class=\"l ib ic by id ie\">\n<div class=\"l fj\"><img loading=\"lazy\" decoding=\"async\" alt=\"Raymond Camden\" class=\"l fd by dd de cx\" src=\"https:\/\/miro.medium.com\/v2\/resize:fill:88:88\/1*ldF-FsLonNyTUOmQ7cIV_g.jpeg\" width=\"44\" height=\"44\" loading=\"lazy\" data-testid=\"authorPhoto\"\/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/a><a href=\"https:\/\/blog.developer.adobe.com\/?source=post_page-----0591982e6000--------------------------------\" rel=\"noopener  ugc nofollow\"><\/p>\n<div class=\"ih ab fj\">\n<div>\n<div class=\"bm\" aria-hidden=\"false\">\n<div class=\"l ii ij by id ik\">\n<div class=\"l fj\"><img loading=\"lazy\" decoding=\"async\" alt=\"Adobe Tech Blog\" class=\"l fd by br il cx\" src=\"https:\/\/miro.medium.com\/v2\/resize:fill:48:48\/1*riyFijvwTfGcWNf1guRNtg.png\" width=\"24\" height=\"24\" loading=\"lazy\" data-testid=\"publicationPhoto\"\/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p id=\"1e25\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Watermarks provide an important feature for PDFs by allowing you to \u2018mark\u2019 a document. This can be used to signify who the document was created for, specify the status of content, add important information about the document, and so forth. Today we\u2019re happy to announce that Acrobat Services has released the PDF Watermark API, currently available via our <a class=\"af nu\" href=\"https:\/\/developer.adobe.com\/document-services\/docs\/apis\/#tag\/PDF-Watermark\/operation\/pdfoperations.addwatermark\" rel=\"noopener ugc nofollow\" target=\"_blank\">REST API<\/a> and soon supported via our various SDKs. Let\u2019s demonstrate this in action.<\/p>\n<p id=\"2b1d\" class=\"pw-post-body-paragraph mw mx gu my b mz ot nb nc nd ou nf ng nh ov nj nk nl ow nn no np ox nr ns nt gn bk\">At a high level, adding watermarks is a three-step process.<\/p>\n<ul class=\"\">\n<li id=\"c6dc\" class=\"mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt oy oz pa bk\">First, you upload the PDF you wish to be watermarked.<\/li>\n<li id=\"48c9\" class=\"mw mx gu my b mz pb nb nc nd pc nf ng nh pd nj nk nl pe nn no np pf nr ns nt oy oz pa bk\">Second, you upload the PDF to be used as a watermark. (Currently, you can only add a PDF as a watermark. In the future, we may support text or image-based watermarks.)<\/li>\n<li id=\"54d9\" class=\"mw mx gu my b mz pb nb nc nd pc nf ng nh pd nj nk nl pe nn no np pf nr ns nt oy oz pa bk\">Create the Watermark job, optionally specifying a range of pages for it to be applied to as well as your desired opacity. Watermarks may also be placed on the foreground or background, with foreground being the default. In general, it is safer to use the foreground as a background watermark can be covered by opaque elements of the PDF-like images.<\/li>\n<\/ul>\n<p id=\"223f\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Note that like other Acrobat Services, you can use cloud-based storage instead of uploading assets.<\/p>\n<p id=\"3159\" class=\"pw-post-body-paragraph mw mx gu my b mz ot nb nc nd ou nf ng nh ov nj nk nl ow nn no np ox nr ns nt gn bk\">We\u2019ve covered the basics of our REST API before, but if you\u2019ve missed that, you can read the introduction here: <a class=\"af nu\" href=\"https:\/\/medium.com\/adobetech\/announcing-the-new-adobe-document-services-rest-apis-8d85951176cf\" rel=\"noopener\">Announcing the New Adobe Document Services REST APIs<\/a>. As the basics of authentication and asset uploading haven\u2019t changed in two years, we\u2019ll skip over that code and instead focus on how easy it is to kick off the watermark job. Given that you\u2019ve uploaded a source PDF:<\/p>\n<figure class=\"pj pk pl pm pn po pg ph paragraph-image\">\n<div class=\"pg ph pi\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*WZmoYN96iF_GvNVgf52YQg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*WZmoYN96iF_GvNVgf52YQg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*WZmoYN96iF_GvNVgf52YQg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*WZmoYN96iF_GvNVgf52YQg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*WZmoYN96iF_GvNVgf52YQg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*WZmoYN96iF_GvNVgf52YQg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1026\/format:webp\/1*WZmoYN96iF_GvNVgf52YQg.png 1026w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 513px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*WZmoYN96iF_GvNVgf52YQg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*WZmoYN96iF_GvNVgf52YQg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*WZmoYN96iF_GvNVgf52YQg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*WZmoYN96iF_GvNVgf52YQg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*WZmoYN96iF_GvNVgf52YQg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*WZmoYN96iF_GvNVgf52YQg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1026\/1*WZmoYN96iF_GvNVgf52YQg.png 1026w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 513px\"\/><img loading=\"lazy\" alt=\"Screenshot of a PDF document\" class=\"bh md pp c\" width=\"513\" height=\"650\" loading=\"lazy\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"f3e6\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">And given an uploaded PDF to use for watermarking:<\/p>\n<figure class=\"pj pk pl pm pn po pg ph paragraph-image\">\n<div class=\"pg ph pq\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*FUdXfIIgSFgQDQudYSpRjg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*FUdXfIIgSFgQDQudYSpRjg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*FUdXfIIgSFgQDQudYSpRjg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*FUdXfIIgSFgQDQudYSpRjg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*FUdXfIIgSFgQDQudYSpRjg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*FUdXfIIgSFgQDQudYSpRjg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1006\/format:webp\/1*FUdXfIIgSFgQDQudYSpRjg.png 1006w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 503px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*FUdXfIIgSFgQDQudYSpRjg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*FUdXfIIgSFgQDQudYSpRjg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*FUdXfIIgSFgQDQudYSpRjg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*FUdXfIIgSFgQDQudYSpRjg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*FUdXfIIgSFgQDQudYSpRjg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*FUdXfIIgSFgQDQudYSpRjg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1006\/1*FUdXfIIgSFgQDQudYSpRjg.png 1006w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 503px\"\/><img loading=\"lazy\" alt=\"Screenshot of PDF that says, Propery of Fictional Made Up Company\" class=\"bh md pp c\" width=\"503\" height=\"650\" loading=\"lazy\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"6694\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">You can make a request to kick off a watermarking job like so:<\/p>\n<figure class=\"pj pk pl pm pn po\"\/>\n<p id=\"75cd\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Note that this example only uses the required arguments specifying our input (the first PDF shown above) and our watermark (the second PDF shown above).<\/p>\n<p id=\"9950\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Again, as with our other APIs, this returns a \u201cjob\u201d URL that you can make a request to and check the status. When the job successfully completes, you can then download the result. (Note that as with our other APIs, specifying a webhook URL is also supported.)<\/p>\n<figure class=\"pj pk pl pm pn po pg ph paragraph-image\">\n<div class=\"pg ph pu\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1028\/format:webp\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 1028w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 514px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1028\/1*Q1q5hqN7ZGH6h1PyAG41Tg.png 1028w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 514px\"\/><img loading=\"lazy\" alt=\"Sample PDF with watermark applied.\" class=\"bh md pp c\" width=\"514\" height=\"650\" loading=\"lazy\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"a619\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">You can find the complete source for this below:<\/p>\n<figure class=\"pj pk pl pm pn po\"\/>\n<p id=\"19ed\" class=\"pw-post-body-paragraph mw mx gu my b mz ot nb nc nd ou nf ng nh ov nj nk nl ow nn no np ox nr ns nt gn bk\">As mentioned above, currently the PDF Watermark API only supports static PDF sources for the actual watermark, however, we already support a way to create dynamic PDFs with the <a class=\"af nu\" href=\"https:\/\/developer.adobe.com\/document-services\/apis\/doc-generation\/\" rel=\"noopener ugc nofollow\" target=\"_blank\">Document Generation API<\/a>. If you\u2019ve never encountered it before, this API lets you use a Microsoft Word document as a template. In the Word doc, you can insert tokens that when passed to the API along with your data, will be replaced with real values in the generated PDF. The API supports simple variable substitutions along with more complex use cases involving looping, conditionals, dynamic tables and so forth. For our need here though we can keep it simple. Here\u2019s a Word document we\u2019ll use as a watermark:<\/p>\n<figure class=\"pj pk pl pm pn po pg ph paragraph-image\">\n<div class=\"pg ph pv\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*4gbqcZt2GyxrU9g1M6X7mw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*4gbqcZt2GyxrU9g1M6X7mw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*4gbqcZt2GyxrU9g1M6X7mw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*4gbqcZt2GyxrU9g1M6X7mw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*4gbqcZt2GyxrU9g1M6X7mw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*4gbqcZt2GyxrU9g1M6X7mw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1300\/format:webp\/1*4gbqcZt2GyxrU9g1M6X7mw.png 1300w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 650px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*4gbqcZt2GyxrU9g1M6X7mw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*4gbqcZt2GyxrU9g1M6X7mw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*4gbqcZt2GyxrU9g1M6X7mw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*4gbqcZt2GyxrU9g1M6X7mw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*4gbqcZt2GyxrU9g1M6X7mw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*4gbqcZt2GyxrU9g1M6X7mw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1300\/1*4gbqcZt2GyxrU9g1M6X7mw.png 1300w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 650px\"\/><img loading=\"lazy\" alt=\"Word document with a token, {{ email }} in the content.\" class=\"bh md pp c\" width=\"650\" height=\"693\" loading=\"lazy\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"b38a\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">In the Word document above, the section, <code class=\"cx pw px py pz b\">{{ email }}<\/code> will be replaced with a real value when the Document Generation API is called. We can then take the result of <em class=\"qa\">that<\/em> call and use it to watermark another PDF.<\/p>\n<p id=\"35f2\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">How is that done? First, we upload our source Word document and then we can call the Document Generation API:<\/p>\n<figure class=\"pj pk pl pm pn po\"\/>\n<p id=\"107c\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">This snippet skips over a bit of stuff we\u2019ve already covered, but you can see the call to the REST API passing the asset ID of the uploaded Word document along with our data, which in this case is just an email address.<\/p>\n<p id=\"3efc\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Now, here comes the fun part. We don\u2019t have to actually download the generated PDF. The result, <code class=\"cx pw px py pz b\">docgenResult<\/code>, contains an asset object and we can simply use that in our Watermark call:<\/p>\n<figure class=\"pj pk pl pm pn po\"\/>\n<p id=\"fdec\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">For this demo, we modified the opacity in our Watermark API call to specify a lower opacity:<\/p>\n<figure class=\"pj pk pl pm pn po\"\/>\n<p id=\"01ee\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">Once run and the result stored, here\u2019s the result:<\/p>\n<figure class=\"pj pk pl pm pn po pg ph paragraph-image\">\n<div class=\"pg ph pu\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*tYl53e9mmwQxUic32HPxlA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*tYl53e9mmwQxUic32HPxlA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*tYl53e9mmwQxUic32HPxlA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*tYl53e9mmwQxUic32HPxlA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*tYl53e9mmwQxUic32HPxlA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*tYl53e9mmwQxUic32HPxlA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1028\/format:webp\/1*tYl53e9mmwQxUic32HPxlA.png 1028w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 514px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*tYl53e9mmwQxUic32HPxlA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*tYl53e9mmwQxUic32HPxlA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*tYl53e9mmwQxUic32HPxlA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*tYl53e9mmwQxUic32HPxlA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*tYl53e9mmwQxUic32HPxlA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*tYl53e9mmwQxUic32HPxlA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1028\/1*tYl53e9mmwQxUic32HPxlA.png 1028w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 514px\"\/><img loading=\"lazy\" alt=\"Watermarked document showing a unique email address.\" class=\"bh md pp c\" width=\"514\" height=\"650\" loading=\"lazy\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"923e\" class=\"pw-post-body-paragraph mw mx gu my b mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt gn bk\">You can find the complete source code for this example here: <a class=\"af nu\" href=\"https:\/\/github.com\/cfjedimaster\/document-services-demos\/blob\/main\/watermark\/dynamic.js\" rel=\"noopener ugc nofollow\" target=\"_blank\">https:\/\/github.com\/cfjedimaster\/document-services-demos\/blob\/main\/watermark\/dynamic.js<\/a><\/p>\n<p id=\"25b5\" class=\"pw-post-body-paragraph mw mx gu my b mz ot nb nc nd ou nf ng nh ov nj nk nl ow nn no np ox nr ns nt gn bk\">If you want to give this API, and the many other features of Acrobat Services, sign up for your <a class=\"af nu\" href=\"https:\/\/acrobatservices.adobe.com\/dc-integration-creation-app-cdn\/main.html\" rel=\"noopener ugc nofollow\" target=\"_blank\">credentials<\/a> and start using the free tier today. If you need help, reach out on our <a class=\"af nu\" href=\"https:\/\/community.adobe.com\/t5\/acrobat-services-api\/ct-p\/ct-Document-Cloud-SDK?filter=all&amp;sort=latest_replies&amp;tabid=discussions\" rel=\"noopener ugc nofollow\" target=\"_blank\">forums<\/a>.<\/p>\n<\/div>\n<p><br \/>\n<br \/><a href=\"https:\/\/blog.developer.adobe.com\/introducing-the-adobe-pdf-watermark-api-0591982e6000?source=rss----9342990108af---4\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Watermarks provide an important feature for PDFs by allowing you to \u2018mark\u2019 a document. This can be used to signify who the document was created for, specify the status of content, add important information about the document, and so forth. Today we\u2019re happy to announce that Acrobat Services has released the PDF Watermark API, currently [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8998,"comment_status":"","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[19],"tags":[],"class_list":["post-8997","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-graphics-design"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/posts\/8997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=8997"}],"version-history":[{"count":0,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/posts\/8997\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/media\/8998"}],"wp:attachment":[{"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=8997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=8997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=8997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}