RDN Generate PDF by HTML

The "Generate PDF from HTML Template" service can autonomously insert the user's provided inputs and computed values into a pre-established PDF template.

The “Generate PDF from HTML Template” service can autonomously insert the user’s provided inputs and computed values into a pre-established PDF template. Users must upload a PDF template in HTML to utilize this service. Within the PDF template, the merge fields, which are essentially input fields, should be indicated using the syntax $%<Name of the input variable>%$.

Upon invoking the PDF generation service, you will be provided with the path to access and download the generated PDF. You can then associate this PDF path with a Marketo field, allowing you to utilize it for your specific requirements.

  1. Steps to personalize HTML to PDF configuration:

    1.1 Click on the Manage option of this service.

1.2  The list of personalized existing PDF configurations will be displayed here.

  1. To create a personalized new PDF:

When you trigger the PDF generation service, it will furnish you with the pathway for accessing and downloading the generated PDF. Subsequently, you can link this PDF path to a Marketo field, enabling you to use it as necessary for your specific needs.

2.1 Click on ‘+”  icon. Enter the name of the template, upload the HTML file, and Save the template.

2.2 You have now created an HTML template that includes merge fields. The HTML file for uploading must adhere to valid HTML standards, including HTML tags. For instance, please take a look at the Seminar Pass HTML template provided below.

Upload the template

Existing Template Preview: To have a preview look at the existing template

Update template: If you want to update the existing HTML Template.

Upload Template Preview: You can preview the template you have uploaded.

Save: To save the uploaded template.

Please note that the merge fields will be provided via the payload of the POST API. For instance, with the template mentioned above, the corresponding merge JSON will be transmitted through the POST API as follows:

  1. Steps to configure service Generate PDF by HTML in Marketo:

Please note that the request parameters values (in step 2) and Marketo Fields (in step 4) are just for example. You have to enter the values as per your service requirement.

3.1 Go to Admin and click Webhooks. Click New Webhook.

3.2  Name and configure your webhook for Generate PDF By HTML Template.

Webhook Name: Name of the webhook. In the above example, the Webhook name is the same as the Service name. Webhook names can be provided as per requirement.

URL: The URL of the Generate PDF By HTML Template. The URL has domain and query parameters that will remain the same. 

Template:
Request Token Encoding: It will remain None.
Response type: Select the response format as JSON.
Request Type: The Request Type will remain the same (i.e.) POST as given in the example.

3.3 Add Authentication Header

Please note that the auth-key shown above is the original auth-key. So, the same value of auth-key and Content-Type should be used while configuring Webhook as shown.

3.4 Response Mappings: Response mappings are created by linking a Response Attribute to the output generated by your Custom Service JavaScript function. It is advisable to return JSON from the custom service as it simplifies the process of mapping it to the corresponding Marketo field.