Html to PDF

Convert HTML Resources to a PDF File

Changed on

Creates PDFs from static/dynamic HTML or HTML(with inline CSS) or just a URL. It's a common scenario for enterprise to provide end users with a HTML template with form fields. In case of dynamic HTML this API allows you to capture the users unique data entries and then save it as PDF. Collected data is stored in a JSON file, and the source HTML file must include <script src='./json.js' type='text/javascript'></script>. You can also provide the URL of the HTML page in inputUrl parameter. <b>However, creating PDF from URL is not supported in External Storage flow.</b><br><b>We do not provide support under the following conditions:</b><br>1. The URL Scheme is not HTTPS.<br>2. The hostname resolves to a non-routable IP address. This encompasses scenarios where redirects lead to non-routable IP addresses as well.<br>

post/operation/htmltopdf

Request

  • Base URL: https://pdf-services-ue1.adobe.io
  • URL: https://pdf-services-ue1.adobe.io/operation/htmltopdf
  • Auth: none declared. Required headers: Authorization, x-api-key

Headers

Authorizationstring required

Bearer + Token (<a href="https://developer.adobe.com/document-services/docs/overview/pdf-services-api/gettingstarted/#step-1--getting-the-access-token">Learn more</a> about getting the access token)

x-api-keystring required

The clientId from the generated credentials

Request body

OR

Example request

{
  "assetID": "urn:aaid:AS:UE1:23c30ee0-2c4d-46d6-87f2-087832fca718",
  "json": "{}",
  "includeHeaderFooter": true,
  "pageLayout": {
    "pageWidth": 11,
    "pageHeight": 8.5
  },
  "waitTimeToLoad": 100,
  "includeRenderedHtml": true,
  "createTaggedPDF": true,
  "notifiers": [
    {
      "type": "CALLBACK",
      "data": {
        "url": "https://dummy.callback.org/",
        "headers": {
          "x-api-key": "dummykey",
          "access-token": "dummytoken"
        }
      }
    }
  ]
}

Response

Request creation for the operation and status uri generated, which can be found in the 'location' header.

Changes

    • info

      added the new optional request property /

    • info

      added the new optional request property //

    • info

      added the new optional request property /

    • info

      added the new optional request property //