How to Integrate Xano and PDF.co?

About Xano and PDF.co

Xano is a low-code backend development platform that allows developers to build, deploy, and scale web applications quickly and easily. With Xano, developers can create APIs and backend logic using a visual interface, without having to write code from scratch. Its low-code approach, which allows developers to create backend functionality without having to write complex code. This can help speed up the development process and reduce the need for highly skilled developers.

PDF.co is a cloud-based platform that provides a suite of web APIs and online tools for working with PDF documents. It offers a wide range of features for processing and manipulating PDF files, including PDF parsing, conversion, and data extraction.

By integrating PDF.co Web APIs to Xano, developers can make an API call to the PDF.co API endpoint, passing in the necessary parameters and authentication credentials. This can be done using Xano’s built-in API integration feature, which allows developers to define API endpoints and manage authentication and authorization settings.

How to Convert HTML to PDF

Step 1: Create a Workspace

  • Let’s begin by accessing your Xano account and setting up a new workspace.

Step 2: Library and Function

  • To proceed, go to the Library tab in your dashboard and then select the Function option from the available choices.
  • Then, click on the Add Function button.
Library and Function

Step 3: Function Workflow

  • In your Function workflow, locate and click on the Function Stack.
Function Workflow

Step 4: Add Function

  • Below the Add Function section, click on the External API Request option to process an external endpoint.
Add Function

Step 5: External API Request

  • To add the CURL code snippet, click on the Import CURL button. You can find a sample CURL code snippet at this link. Copy the CURL code from the provided link and paste it into the designated area.
External API Request

Step 6: Add API Key

  • Next, add your API key to the designated field. You can obtain the API key from your PDF.co dashboard, or if you haven’t signed up yet, you can get it by registering at this link. Once you have the API key, paste it into the appropriate location to enable the integration.
Add API Key
Add API Key

Step 7: Import JSON

  • To generate a PDF document, import the JSON code along with the raw HTML using the Import JSON as headers, and make sure to obtain the sample JSON code from the provided link.
Import JSON
Import JSON

Step 8: Run and Debug

  • Let’s execute the workflow to generate a PDF document using the provided raw HTML code.
Run and Debug
Run and Debug

Step 9: Run Result

  • We successfully ran the workflow and generated the PDF document! Please copy the URL provided and paste it into your browser to view the output.
Run Result

Step 10: Generated PDF Document

  • Here is the PDF document generated from the raw HTML code. It contains all the formatted content and elements from the HTML.
Generated PDF Document

In this tutorial, you’ve gained valuable insights into integrating PDF.co with Xano. By utilizing the PDF.co HTML to PDF endpoint, you successfully generated a PDF document from raw HTML content. This powerful integration allows you to convert dynamic HTML elements into a static, easily shareable PDF file. With this newfound knowledge, you can now explore more possibilities and implement PDF generation capabilities into your Xano applications.