{"id":8982,"date":"2024-08-30T15:16:17","date_gmt":"2024-08-30T09:46:17","guid":{"rendered":"https:\/\/www.satup.xyz\/index.php\/2024\/08\/30\/help-preview-the-adobe-export-and-import-form-data-api-by-raymond-camden-aug-2024\/"},"modified":"2024-08-30T15:16:17","modified_gmt":"2024-08-30T09:46:17","slug":"help-preview-the-adobe-export-and-import-form-data-api-by-raymond-camden-aug-2024","status":"publish","type":"post","link":"https:\/\/www.satup.xyz\/index.php\/2024\/08\/30\/help-preview-the-adobe-export-and-import-form-data-api-by-raymond-camden-aug-2024\/","title":{"rendered":"Help Preview the Adobe Export and Import Form Data API | by Raymond Camden | Aug, 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-----6463268d1f42--------------------------------\" 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-----6463268d1f42--------------------------------\" 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<figure class=\"mz na nb nc nd ne mw mx paragraph-image\">\n<div class=\"mw mx my\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1200\/format:webp\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 1200w\" 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, 600px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1200\/1*zZ8ZX3SCia5gWQJYTBblHQ.png 1200w\" 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, 600px\"\/><img fetchpriority=\"high\" alt=\"\" class=\"bh md nf c\" width=\"600\" height=\"400\" loading=\"eager\" role=\"presentation\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"1726\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">We\u2019ve recently released two oft-requested APIs for Adobe Acrobat Services, the ability to both export and import form data from PDFs. These APIs are currently available to our beta program and not generally available, but read on for details on how these APIs work, and how you can sign up to help test them!<\/p>\n<p id=\"052f\" class=\"pw-post-body-paragraph ng nh gu ni b nj pc nl nm nn pd np nq nr pe nt nu nv pf nx ny nz pg ob oc od gn bk\">The Adobe Import\/Export Form Data APIs can be incredibly important for organizations looking to handle either incoming forms or improve the experience for their users when filling out forms. Some possible use cases include:<\/p>\n<ul class=\"\">\n<li id=\"01c6\" class=\"ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od ph pi pj bk\">Processing incoming PDFs to take the filled forms and insert the contents into a database.<\/li>\n<li id=\"0b69\" class=\"ng nh gu ni b nj pk nl nm nn pl np nq nr pm nt nu nv pn nx ny nz po ob oc od ph pi pj bk\">Using known information about a user to prefill a form before they download, saving them time.<\/li>\n<\/ul>\n<p id=\"d82e\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">Before continuing, note that these APIs work with AcroForm\/Static XFA forms only. Currently, the APIs are not supported in the SDKs but once released, the SDKs will be updated to add support. As we\u2019ve covered the REST APIs many times in the past, we\u2019re going to skip demonstrating the authentication aspect as well as uploading. At the end, we\u2019ll share an entire script you can use in your testing.<\/p>\n<p id=\"f1cf\" class=\"pw-post-body-paragraph ng nh gu ni b nj pc nl nm nn pd np nq nr pe nt nu nv pf nx ny nz pg ob oc od gn bk\">Let\u2019s start with exporting form data, because even if you\u2019re use case is importing data, most likely you\u2019ll need to perform one export to get the \u2018shape\u2019 of the data. This will make more sense when we get to that section, but for now, imagine this simple form:<\/p>\n<figure class=\"pq pr ps pt pu ne mw mx paragraph-image\">\n<div class=\"mw mx pp\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*qti0_rgwHBTvyjDxDchuDg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*qti0_rgwHBTvyjDxDchuDg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*qti0_rgwHBTvyjDxDchuDg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*qti0_rgwHBTvyjDxDchuDg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*qti0_rgwHBTvyjDxDchuDg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*qti0_rgwHBTvyjDxDchuDg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:902\/format:webp\/1*qti0_rgwHBTvyjDxDchuDg.png 902w\" 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, 451px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*qti0_rgwHBTvyjDxDchuDg.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*qti0_rgwHBTvyjDxDchuDg.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*qti0_rgwHBTvyjDxDchuDg.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*qti0_rgwHBTvyjDxDchuDg.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*qti0_rgwHBTvyjDxDchuDg.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*qti0_rgwHBTvyjDxDchuDg.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:902\/1*qti0_rgwHBTvyjDxDchuDg.png 902w\" 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, 451px\"\/><img loading=\"lazy\" alt=\"A form prompting for name, age, favorite movie, and preferred options.\" class=\"bh md nf c\" width=\"451\" height=\"377\" loading=\"lazy\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"1c82\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">This form has 4 main questions:<\/p>\n<ul class=\"\">\n<li id=\"124f\" class=\"ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od ph pi pj bk\">Your name (text field)<\/li>\n<li id=\"f7d3\" class=\"ng nh gu ni b nj pk nl nm nn pl np nq nr pm nt nu nv pn nx ny nz po ob oc od ph pi pj bk\">Your age (a numeric field)<\/li>\n<li id=\"8ac4\" class=\"ng nh gu ni b nj pk nl nm nn pl np nq nr pm nt nu nv pn nx ny nz po ob oc od ph pi pj bk\">A dropdown to select a movie<\/li>\n<li id=\"e2b5\" class=\"ng nh gu ni b nj pk nl nm nn pl np nq nr pm nt nu nv pn nx ny nz po ob oc od ph pi pj bk\">A set of checkboxes<\/li>\n<\/ul>\n<p id=\"1254\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">After filling out, and saving the PDF, it could look like so:<\/p>\n<figure class=\"pq pr ps pt pu ne mw mx paragraph-image\">\n<div class=\"mw mx pv\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*86fymyLbi7iZ0m5dTE18cA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*86fymyLbi7iZ0m5dTE18cA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*86fymyLbi7iZ0m5dTE18cA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*86fymyLbi7iZ0m5dTE18cA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*86fymyLbi7iZ0m5dTE18cA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*86fymyLbi7iZ0m5dTE18cA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:848\/format:webp\/1*86fymyLbi7iZ0m5dTE18cA.png 848w\" 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, 424px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*86fymyLbi7iZ0m5dTE18cA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*86fymyLbi7iZ0m5dTE18cA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*86fymyLbi7iZ0m5dTE18cA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*86fymyLbi7iZ0m5dTE18cA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*86fymyLbi7iZ0m5dTE18cA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*86fymyLbi7iZ0m5dTE18cA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:848\/1*86fymyLbi7iZ0m5dTE18cA.png 848w\" 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, 424px\"\/><img loading=\"lazy\" alt=\"The form has filled in values of: Name\u200a\u2014\u200aRaymond Camden. Age, 51. Favorite movie, The Empire Strikes Back, and under preferred options\u200a\u2014\u200aoptions two and three are selected.\" class=\"bh md nf c\" width=\"424\" height=\"344\" loading=\"lazy\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"68b3\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">Now let\u2019s look at how the service works. From the <a class=\"af pw\" href=\"https:\/\/developer.adobe.com\/document-services\/docs\/apis\/#tag\/Export-PDF-Form-Data\" rel=\"noopener ugc nofollow\" target=\"_blank\">API reference<\/a>, we can see that this endpoint has no options specific to the functionality. You pass an asset ID, or an external URL from a supported cloud platform, and simply start the job. As we\u2019ve shared authentication and asset upload code before, we\u2019ll skip that here and simply show how easy it is to kick off a job:<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"5e1f\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">This function takes an asset, access token, and client ID as attributes. It kicks off the job and returns the URL pointing to the status. That\u2019s it!<\/p>\n<p id=\"d57f\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">When the job is complete, the status includes information about how to access the result:<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"acef\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">You can then fetch that result and work with it:<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"d215\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">Given the sample shown above, the result looks like so:<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"dae4\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">Some things to note here:<\/p>\n<ul class=\"\">\n<li id=\"d89c\" class=\"ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od ph pi pj bk\">The numeric value, age, is returned as a string, so you will want to properly convert that (using <code class=\"cx qa qb qc qd b\">parseInt<\/code> probably) to a numeric value.<\/li>\n<li id=\"66fe\" class=\"ng nh gu ni b nj pk nl nm nn pl np nq nr pm nt nu nv pn nx ny nz po ob oc od ph pi pj bk\">The checkboxes return <code class=\"cx qa qb qc qd b\">Off<\/code> or Yes. When a PDF form is edited in Acrobat, the developer can specify the &#8216;Export&#8217; value. This defaults to &#8216;Yes&#8217; but could be something else. Most likely you will want to post-process this as well, perhaps to boolean true or fale values.<\/li>\n<li id=\"1295\" class=\"ng nh gu ni b nj pk nl nm nn pl np nq nr pm nt nu nv pn nx ny nz po ob oc od ph pi pj bk\">There is no inherit \u201cgrouping\u201d of the checkboxes. If you wanted to store them as one value, like an array of true\/false values, then you will need to handle that in your code.<\/li>\n<\/ul>\n<p id=\"35ea\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">Once you\u2019ve identified if you do need post processing and have added it, you can then take this data and insert it into your database, save as a file (CSV perhaps), or work with it in any way that makes sense. Here\u2019s a complete script making use of the API. In order to run this, you will need beta access (documented below) for your credentials.<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"0b5b\" class=\"pw-post-body-paragraph ng nh gu ni b nj pc nl nm nn pd np nq nr pe nt nu nv pf nx ny nz pg ob oc od gn bk\">The other half of our new form support allows you to set form data for a PDF. In order to use this API, you need a PDF with a form of course, and you need your data. If you remember, we mentioned above that getting form data can be useful here. Why? When you get form data, you see the \u2018shape\u2019 of the output. If you remember, our test PDF had a shape like this when output:<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"9324\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">You can use this data to help you integrate the API. Your input data may be from a HTML form post, a database table, or an incoming REST call, and probably will <em class=\"qe\">not<\/em> match that shape. Your code will need to reshape it to match what is required.<\/p>\n<p id=\"0bbe\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">Another important thing to note is that <strong class=\"ni gv\">all values must be strings<\/strong>, even in the case of a numeric value like <code class=\"cx qa qb qc qd b\">age<\/code> from my PDF.<\/p>\n<p id=\"3923\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">API wise this is very similar to the last call, with the only difference being the inclusion of the data you wish to set in the form. Here\u2019s an example method that shows how to do this:<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"02e6\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">As with every other API call, you\u2019ll get a job URL back, you\u2019ll ping that for status, and when done, you get an asset ID pointing to the PDF result. The <code class=\"cx qa qb qc qd b\">data<\/code> attribute above maps to <code class=\"cx qa qb qc qd b\">jsonFormFieldsData<\/code> sent to the API and represents the key\/value pairs of what you want to set in the form. Let&#8217;s look at an example:<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"3f9a\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">We\u2019ve got three values (hard coded, but would be dynamic of course) each with different sets of key\/value pairs for the form. Our code begins (after authentication) by uploading the blank PDF with the form. It then uses that asset for each value in the array of inputs, waits for the job to finish, and then downloads it.<\/p>\n<p id=\"1fb1\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">Here\u2019s one sample result:<\/p>\n<figure class=\"pq pr ps pt pu ne mw mx paragraph-image\">\n<div class=\"mw mx qf\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*OV18po4CAYM88iZ20S8Ajw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*OV18po4CAYM88iZ20S8Ajw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*OV18po4CAYM88iZ20S8Ajw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*OV18po4CAYM88iZ20S8Ajw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*OV18po4CAYM88iZ20S8Ajw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*OV18po4CAYM88iZ20S8Ajw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:918\/format:webp\/1*OV18po4CAYM88iZ20S8Ajw.png 918w\" 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, 459px\" type=\"image\/webp\"\/><source data-testid=\"og\" srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*OV18po4CAYM88iZ20S8Ajw.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*OV18po4CAYM88iZ20S8Ajw.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*OV18po4CAYM88iZ20S8Ajw.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*OV18po4CAYM88iZ20S8Ajw.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*OV18po4CAYM88iZ20S8Ajw.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*OV18po4CAYM88iZ20S8Ajw.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:918\/1*OV18po4CAYM88iZ20S8Ajw.png 918w\" 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, 459px\"\/><img loading=\"lazy\" alt=\"PDF form with filled in values: Name=Grace Undrapress. Age=45. Favorite movie\u200a\u2014\u200aThe Empire Strikes Back, and all options selected.\" class=\"bh md nf c\" width=\"459\" height=\"369\" loading=\"lazy\"\/><\/picture><\/div>\n<\/figure>\n<p id=\"0b35\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">Here\u2019s the complete script:<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"dd0c\" class=\"pw-post-body-paragraph ng nh gu ni b nj pc nl nm nn pd np nq nr pe nt nu nv pf nx ny nz pg ob oc od gn bk\">We\u2019ve emphasized the importance of getting the \u2018shape\u2019 right when importing data into forms. It\u2019s also important to get the <em class=\"qe\">values<\/em> right as well. In our sample PDF, we had a drop down with three values. If you attempt to set that field to a value not in the dropdown, the API will return an error. Here\u2019s an example:<\/p>\n<figure class=\"pq pr ps pt pu ne\"\/>\n<p id=\"0148\" class=\"pw-post-body-paragraph ng nh gu ni b nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od gn bk\">When preparing your data to send to the API, it is important to keep this in mind, and ensure your code is using error handling to trap and log issues with your data.<\/p>\n<p id=\"5907\" class=\"pw-post-body-paragraph ng nh gu ni b nj pc nl nm nn pd np nq nr pe nt nu nv pf nx ny nz pg ob oc od gn bk\">If you want to try out the service while it\u2019s in beta, fill out the <a class=\"af pw\" href=\"https:\/\/developer.adobe.com\/document-services\/pricing\/contact\/sales\/form-data-api\/\" rel=\"noopener ugc nofollow\" target=\"_blank\">form<\/a> and you\u2019ll be contacted with details soon after. In the meantime, check the <a class=\"af pw\" href=\"https:\/\/developer.adobe.com\/document-services\/docs\/apis\/\" rel=\"noopener ugc nofollow\" target=\"_blank\">REST API<\/a> docs for more details on this, and our other, Acrobat APIs.<\/p>\n<\/div>\n<p><br \/>\n<br \/><a href=\"https:\/\/blog.developer.adobe.com\/help-preview-the-adobe-export-and-import-form-data-api-6463268d1f42?source=rss----9342990108af---4\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019ve recently released two oft-requested APIs for Adobe Acrobat Services, the ability to both export and import form data from PDFs. These APIs are currently available to our beta program and not generally available, but read on for details on how these APIs work, and how you can sign up to help test them! The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8983,"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-8982","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\/8982","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=8982"}],"version-history":[{"count":0,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/posts\/8982\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/media\/8983"}],"wp:attachment":[{"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=8982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=8982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.satup.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=8982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}