Step by step guide:

1. In this tutorial, we will use Wikipedia’s contact page to show you how to convert a URL into a PDF document by making a Custom API Call to PDF.co using the /pdf/convert/from/url endpoint. You can check out the PDF.co Web API docs to see the other supported endpoints here.

The Custom API Call is designed for advanced users. This gives you access to customizations that are not available in Anything to PDF Converter. If you are not looking for advanced settings, you can use Anything to PDF Converter Action in the plugin with URL as the input.

Wikipedia Contact Us Page
Screenshot of Source URL

2. We assume that you have already configured the Trigger step and are ready to set up the Action step. For our Action step, let’s choose PDF.co as the App and Custom API Call as the Action Event.

Setup Custom API Call In PDF.co In The Action Step

3. Now, let’s set up the Custom API Call for URL to PDF.

  • In the PDF.co API Endpoint field, select v1/pdf/convert/from/url.
  • In the Input JSON, enter the JSON code. Following is the complete JSON code that we will use for this example.

{
"url": "https://wikipedia.org/wiki/Wikipedia:Contact_us",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false
}

Configure Custom API Call With API Endpoint And JSON

4. We are now ready to send our Custom API Call to PDF.co. Click on Text & Review button to send our data.

Send Custom API Data To Test And Review

5. Our test was a success! Kindly copy the URL and paste it on your browser’s address bar to see the result.

PDF.co Successfully Processed Request

6. Fantastic! We have successfully converted Wikipedia’s Contact page URL to PDF using the Custom API Call to PDF.co.

Output PDF Of The Converted URL
Screenshot of Output PDF File

NOTE: You can set up the next step to save the generated file in Google Drive or Dropbox depending on your requirement.