{"id":8567,"date":"2024-01-19T19:57:31","date_gmt":"2024-01-19T19:57:31","guid":{"rendered":"https:\/\/www.satup.xyz\/index.php\/2024\/01\/19\/dynamically-generating-document-samples-with-acrobat-services-by-raymond-camden\/"},"modified":"2024-01-19T19:57:31","modified_gmt":"2024-01-19T19:57:31","slug":"dynamically-generating-document-samples-with-acrobat-services-by-raymond-camden","status":"publish","type":"post","link":"https:\/\/www.satup.xyz\/index.php\/2024\/01\/19\/dynamically-generating-document-samples-with-acrobat-services-by-raymond-camden\/","title":{"rendered":"Dynamically Generating Document Samples with Acrobat Services | by Raymond Camden"},"content":{"rendered":"<p><br \/>\n<\/p>\n<div>\n<div>\n<h2 id=\"79ba\" class=\"pw-subtitle-paragraph ho gq gr be b hp hq hr hs ht hu hv hw hx hy hz ia ib ic id cp dt\">How can Adobe Acrobat Services help with things such as offering \u201cteaser\u201d samples of documents that are up for sale?<\/h2>\n<div class=\"ie if ig ih ii\">\n<div class=\"speechify-ignore ab co\">\n<div class=\"speechify-ignore bg l\">\n<div class=\"ij ik il im in ab\">\n<div>\n<div class=\"ab io\"><a href=\"https:\/\/medium.com\/@cfjedimaster?source=post_page-----fad3d4052e20--------------------------------\" rel=\"noopener follow\"><\/p>\n<div>\n<div class=\"bl\" aria-hidden=\"false\">\n<div class=\"l ip iq bx ir is\">\n<div class=\"l fg\"><img loading=\"lazy\" decoding=\"async\" alt=\"Raymond Camden\" class=\"l fa bx dc dd cw\" 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-----fad3d4052e20--------------------------------\" rel=\"noopener  ugc nofollow\"><\/p>\n<div class=\"iv ab fg\">\n<div>\n<div class=\"bl\" aria-hidden=\"false\">\n<div class=\"l iw ix bx ir iy\">\n<div class=\"l fg\"><img loading=\"lazy\" decoding=\"async\" alt=\"Adobe Tech Blog\" class=\"l fa bx bq iz cw\" 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<figure class=\"np nq nr ns nt nu nm nn paragraph-image\">\n<div class=\"nm nn no\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 1400w\" 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, 700px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*ccN-zUTmU-qQXYV8OmpmVw.jpeg 1400w\" 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, 700px\"\/><img fetchpriority=\"high\" alt=\"\" class=\"bg mu nv c\" width=\"700\" height=\"515\" loading=\"eager\" role=\"presentation\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"f067\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Many organizations offer documents for sale, and as part of that process, they will sometimes create a sample of the document to offer online for free.<\/p>\n<p id=\"38a0\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">As an example, an online technical bookseller may offer the first thirty pages as a \u2018teaser\u2019 to help encourage sales.<\/p>\n<p id=\"8f7d\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Creating these samples could be done by hand, but this is a great example of where <a class=\"af os\" href=\"https:\/\/developer.adobe.com\/document-services\/\" rel=\"noopener ugc nofollow\" target=\"_blank\">Adobe Acrobat Services<\/a> can help automate the process.<\/p>\n<p id=\"6c8b\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">In this blog, we\u2019ll demonstrate a simple example of this process. We\u2019ll use Node.js, but the principals shown here could be done in any language via the <a class=\"af os\" href=\"https:\/\/developer.adobe.com\/document-services\/docs\/apis\/\" rel=\"noopener ugc nofollow\" target=\"_blank\">REST APIs<\/a>. Let\u2019s get started!<\/p>\n<p id=\"f650\" class=\"pw-post-body-paragraph nw nx gr ny b hp pp oa ob hs pq od oe of pr oh oi oj ps ol om on pt op oq or gk bj\">Before going into the code, let\u2019s quickly cover what exactly is being built.<\/p>\n<p id=\"bc6e\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">For the purpose of this particular demo, the process of creating samples will be done via a Node.js script that reads from one folder and saves it to another.<\/p>\n<p id=\"3ee0\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">This is, obviously, not automated, but could be migrated to a platform where that would be allowed.<\/p>\n<p id=\"d296\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">For example, this same process could be done in Microsoft PowerAutomate and set up to automatically kick off when a new file is added.<\/p>\n<p id=\"d35f\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Our process will do two things to each PDF:<\/p>\n<ul class=\"\">\n<li id=\"7010\" class=\"nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or pu pv pw bj\">Separate out the first five pages for the sample.<\/li>\n<li id=\"c264\" class=\"nw nx gr ny b hp px oa ob hs py od oe of pz oh oi oj qa ol om on qb op oq or pu pv pw bj\">Place a PDF in front that describes the fact that this is only a sample and that the full version can be purchased online.<\/li>\n<\/ul>\n<p id=\"2a7e\" class=\"pw-post-body-paragraph nw nx gr ny b hp pp oa ob hs pq od oe of pr oh oi oj ps ol om on pt op oq or gk bj\">Our code is split between two files.<\/p>\n<p id=\"d258\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">The first file is responsible for checking the directories (both input and output) to figure out what it needs to do. Once it determines the PDFs that need to be actually processed, it calls that routine which is set up in the second file.<\/p>\n<p id=\"185d\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Here\u2019s the code for that first file:<\/p>\n<figure class=\"np nq nr ns nt nu\"\/>\n<p id=\"4cc5\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">From the top, you can see our configuration variables pointing to the input and output directories, as well as the PDF that\u2019s placed in front of each sample result.<\/p>\n<p id=\"5335\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Also, make note of the <code class=\"cw qf qg qh qi b\">SAMPLE_SIZE<\/code> variable which determines the number of pages to use when creating the sample. It would be possible to make this dynamic.<\/p>\n<p id=\"3f26\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">So for example, the <a class=\"af os\" href=\"https:\/\/developer.adobe.com\/document-services\/docs\/apis\/#tag\/PDF-Properties\" rel=\"noopener ugc nofollow\" target=\"_blank\">PDF Properties<\/a> API could be used to figure out the total number of pages, and math could then be used to generate a relative size for the number of pages. Perhaps 10% or so, with an upward maximum bound of some limit. For this example, we&#8217;ll keep it to a simple 5-page max.<\/p>\n<p id=\"4728\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">To run quicker, the script checks to see if a corresponding file of the same name from the input directory already exists in the output and skips over it. Finally, when it figures out what needs to be done, it iterates over each and calls <code class=\"cw qf qg qh qi b\">makeSample<\/code> in our next script. Let&#8217;s now take a look at that.<\/p>\n<p id=\"df7e\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">The script, <code class=\"cw qf qg qh qi b\">makeSamples.js<\/code>, is essentially a wrapper for our <a class=\"af os\" href=\"https:\/\/developer.adobe.com\/document-services\/docs\/apis\/\" rel=\"noopener ugc nofollow\" target=\"_blank\">REST APIs<\/a>. In general, the process of working with the Acrobat Services APIs all follow the same basic flow:<\/p>\n<ul class=\"\">\n<li id=\"6e0d\" class=\"nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or pu pv pw bj\">Convert credentials into an access token<\/li>\n<li id=\"777d\" class=\"nw nx gr ny b hp px oa ob hs py od oe of pz oh oi oj qa ol om on qb op oq or pu pv pw bj\">Create a new asset, which represents the document we\u2019re uploading to use for some job<\/li>\n<li id=\"e856\" class=\"nw nx gr ny b hp px oa ob hs py od oe of pz oh oi oj qa ol om on qb op oq or pu pv pw bj\">Actually upload that document<\/li>\n<li id=\"6bfc\" class=\"nw nx gr ny b hp px oa ob hs py od oe of pz oh oi oj qa ol om on qb op oq or pu pv pw bj\">Start the process<\/li>\n<li id=\"5d1e\" class=\"nw nx gr ny b hp px oa ob hs py od oe of pz oh oi oj qa ol om on qb op oq or pu pv pw bj\">Check the status of the process<\/li>\n<li id=\"c25b\" class=\"nw nx gr ny b hp px oa ob hs py od oe of pz oh oi oj qa ol om on qb op oq or pu pv pw bj\">When done, download the result.<\/li>\n<\/ul>\n<p id=\"633f\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">This may sound a bit complex, but each part is a relatively small REST call that\u2019s easy to write. Here\u2019s the <code class=\"cw qf qg qh qi b\">makeSample<\/code> function:<\/p>\n<figure class=\"np nq nr ns nt nu\"\/>\n<p id=\"c1f0\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Let\u2019s break this down. First, getting an access token:<\/p>\n<figure class=\"np nq nr ns nt nu\"\/>\n<p id=\"eed3\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">This is code we\u2019ve shared before. Essentially the client ID and secret and exchanged for the token. Do note we added a bit of caching (<code class=\"cw qf qg qh qi b\">cachedToken<\/code>) so that we can reuse the value.<\/p>\n<p id=\"2d9b\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Next, the <code class=\"cw qf qg qh qi b\">upload<\/code> function, which is actually two bits &#8211; the creation of an &#8220;Asset&#8221; and the actual upload itself. This function simplifies it into one:<\/p>\n<figure class=\"np nq nr ns nt nu\"\/>\n<p id=\"fa5b\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Which then chains to the two utility functions:<\/p>\n<figure class=\"np nq nr ns nt nu\"\/>\n<p id=\"c811\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">So far, everything has basically been \u201csetup\u201d and preparation for the real work: actually creating the sample.<\/p>\n<p id=\"2939\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Luckily we can do this in one quick call to the <a class=\"af os\" href=\"https:\/\/developer.adobe.com\/document-services\/docs\/apis\/#tag\/Combine-PDF\" rel=\"noopener ugc nofollow\" target=\"_blank\">Combine PDF<\/a> call. This API not only lets you combine two PDFs, it also lets you specify a page range when combining, which means we can take our \u201cprepend\u201d PDF, take our larger PDF document, combine them, and specify a page range for the later to only get the specified number of sample pages.<\/p>\n<p id=\"cc15\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Here\u2019s what that code looks like:<\/p>\n<figure class=\"np nq nr ns nt nu\"\/>\n<p id=\"114d\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">In the body of the call, we pass in two assets, with the first representing the PDF \u201cprepended\u201d in front of our result and the second being a \u2018slice\u2019 of the main PDF.<\/p>\n<p id=\"758e\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">This API call, like others in Acrobat Services, returns a job URL we can ping for our status update. The <code class=\"cw qf qg qh qi b\">pollJob<\/code> function handles hitting this endpoint once a second and waiting until the job succeeds or fails. (Note that this example doesn&#8217;t actually <em class=\"qj\">handle<\/em> errors, and usually it should!)<\/p>\n<figure class=\"np nq nr ns nt nu\"\/>\n<p id=\"6c76\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">The final bit handles the download. Our job, when successful, returns the URL where the bits can be downloaded, so this is just passed to <code class=\"cw qf qg qh qi b\">downloadFile<\/code>:<\/p>\n<figure class=\"np nq nr ns nt nu\"\/>\n<p id=\"14c2\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">That was quite a bit of code to show you, so if you want to review, the entire application may be found here: <a class=\"af os\" href=\"https:\/\/github.com\/cfjedimaster\/document-services-demos\/tree\/main\/article_support\/book_demo\" rel=\"noopener ugc nofollow\" target=\"_blank\">https:\/\/github.com\/cfjedimaster\/document-services-demos\/tree\/main\/article_support\/book_demo<\/a><\/p>\n<p id=\"a639\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">Here\u2019s a screenshot from one of the samples, showing the first and second pages:<\/p>\n<figure class=\"np nq nr ns nt nu nm nn paragraph-image\">\n<div class=\"nm nn qk\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*HsPZocL2iPftrMXtY1ljbA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*HsPZocL2iPftrMXtY1ljbA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*HsPZocL2iPftrMXtY1ljbA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*HsPZocL2iPftrMXtY1ljbA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*HsPZocL2iPftrMXtY1ljbA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*HsPZocL2iPftrMXtY1ljbA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1300\/format:webp\/1*HsPZocL2iPftrMXtY1ljbA.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*HsPZocL2iPftrMXtY1ljbA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*HsPZocL2iPftrMXtY1ljbA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*HsPZocL2iPftrMXtY1ljbA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*HsPZocL2iPftrMXtY1ljbA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*HsPZocL2iPftrMXtY1ljbA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*HsPZocL2iPftrMXtY1ljbA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1300\/1*HsPZocL2iPftrMXtY1ljbA.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=\"Screenshot of a PDF showing two pages. On the left is the prepended PDF, on the right the first page of the original PDF.\" class=\"bg mu nv c\" width=\"650\" height=\"418\" loading=\"lazy\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"739e\" class=\"pw-post-body-paragraph nw nx gr ny b hp pp oa ob hs pq od oe of pr oh oi oj ps ol om on pt op oq or gk bj\">In this article, we demonstrated a process to automate a fairly common requirement for stores that sell digital documents \u2014 creating a sample PDF. However, there\u2019s room for improvement.<\/p>\n<p id=\"a61b\" class=\"pw-post-body-paragraph nw nx gr ny b hp nz oa ob hs oc od oe of og oh oi oj ok ol om on oo op oq or gk bj\">The PDF prepended in front of the document is the same for all samples. What if we could personalize it and make it more specific to the source PDF being sampled? In the next article, we\u2019ll show just that, making use of the powerful <a class=\"af os\" href=\"https:\/\/developer.adobe.com\/document-services\/apis\/doc-generation\/\" rel=\"noopener ugc nofollow\" target=\"_blank\">Document Generation API<\/a><\/p>\n<\/div>\n<p><br \/>\n<br \/><a href=\"https:\/\/blog.developer.adobe.com\/dynamically-generating-document-samples-with-acrobat-services-fad3d4052e20?source=rss----9342990108af---4\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How can Adobe Acrobat Services help with things such as offering \u201cteaser\u201d samples of documents that are up for sale? Many organizations offer documents for sale, and as part of that process, they will sometimes create a sample of the document to offer online for free. As an example, an online technical bookseller may offer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8568,"comment_status":"open","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-8567","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\/8567","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=8567"}],"version-history":[{"count":0,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/posts\/8567\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/media\/8568"}],"wp:attachment":[{"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=8567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=8567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=8567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}