Graphic showing how converting HTML Newsletters can preserve content in PDF format

Convert HTML Newsletter to PDF to Preserve Content

Automate the Conversion of HTML Newsletters to PDF Format for Preservation, Archiving, and Easier Distribution Using the Convert to PDF API Tool
Share this page

Most newsletters are created using HTML formatting for a rich email viewing experience. This works great for initial distribution, but HTML is not an ideal format for preserving the content in each newsletter. Whether you're looking to maintain an archive of your own monthly newsletters, offer a PDF version of your newsletter to your users, or save, organize, and share the many incoming newsletters you receive, pdfRest can help.

If you have the original HTML used to generate the newsletter, you can easily send the .html file to the Convert to PDF API Tool directly.

Otherwise, if you've received an email newsletter that you'd like to convert to PDF, look for a link to a web-hosted version. Here's where that link appears at the bottom of the pdfRest monthly newsletter:

Screen-Shot-2023-03-17-at-11.54.50-AM

The Convert to PDF API Tool accepts URLs as input for converting HTML to PDF, making it easy to convert this web-hosted version of the newsletter. Simply take the URL from that link and pass it to the url parameter of the /pdf endpoint. That's it!

Default Settings Code Example   |   Load this into API Lab↗


    curl -X POST "https://api.pdfrest.com/pdf" \ 
      -H "Accept: application/json" \ 
      -H "Content-Type: multipart/form-data" \
      -H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
      -F "url=https://datalogicsinc.activehosted.com/index.php?
      action=social&chash=19f3cd308f1455b3fa09a282e0d496f4.368&nosocial=1" \
      

This applies default settings to create a PDF that looks like this:

page1 page2 page3


All images, text, and links are now preserved in a PDF document! You could stop here, but you may want to adjust a few settings to enhance the visual quality of the document, including the output file name, compression for images, downsample for images, page_size, and page_margin.

Adjusted Settings Code Example   |   Load this into API Lab↗


    curl -X POST "https://api.pdfrest.com/pdf" \ 
      -H "Accept: application/json" \ 
      -H "Content-Type: multipart/form-data" \
      -H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
      -F "url=https://datalogicsinc.activehosted.com/index.php?
      action=social&chash=19f3cd308f1455b3fa09a282e0d496f4.368&nosocial=1" \ 
      -F "output=pdfRest_News_February" \ 
      -F "compression=lossless" \ 
      -F "downsample=150" \ 
      -F "page_size=A4" \ 
      -F "page_margin=0in" \
      

Here's what our final result looks like:

page1 page1

We've covered how to use the pdfRest Convert to PDF API Tool to convert a newsletter from HTML to PDF by simply passing in the URL of the web-hosted version and tweaking settings to format the PDF. Ready to give it a try?

Try Now with API Lab!




Convert to PDF


Generate a self-service API Key now!

Create your FREE API Key to start processing PDFs in seconds, only possible with pdfRest.

Compare Plans
Contact Us