I can only imagine you reading this if you are an attorney or work for an attorney in some capacity. Perhaps you are a programmer and have been tasked with converting thousands of emails to PDF format. If so, you have come to the right place. If you only need to convert a single EML file to PDF, there are easier ways to do that than what I’m about to describe.
Api2Pdf is a tool (REST API) for application developers to convert HTML, URLs, and various file types to PDF format, including EML to PDF and EMLX to PDF. Since this is an API, you can use this tool with any programming language (php, python, c#, java, javascript, ruby, nodejs, etc, etc.)
To convert EML to PDF using the Api2Pdf API service, we need to make use of our LibreOffice API. Details about our LibreOffice to PDF endpoint is outlined here: https://app.swaggerhub.com/apis/api2pdf/api2pdf/1.0.0#/LibreOffice/libreConvertPost
If all is well, this will generate generate a PDF and provide you with the result. This is just a quick test with our SwaggerHub documentation. If this worked well for you, see the next section on the best practices for doing it for real.
If your quick test was successful, that means you are ready for the real deal. Our Office to PDF API runs on AWS Lambda. This provides both advantages and disadvantages. The main advantage is that it can operate at massive scale. There are no rate limits or file size limits. Consume as many PDFs as you need. The disadvantage is that it does require the EML file to be accessible at some URL. The LibreOffice endpoint will consume the file at that URL and then convert it to PDF.
Your next steps —
Write a process that will upload the EML file to some accessible URL, preferably Amazon S3. Get the url and then make the API call to Api2Pdf. Api2Pdf will generate the PDF and return you are URL to that generated PDF. Download that PDF to your local cache for your permanent records. Api2Pdf only holds a PDF at that URL for 24 hours.
If you put this in a loop, you can convert EML to PDF, EMLX to PDF, etc in bulk and handle thousands of email files in a very short period of time.
Tags: aws lambda libreoffice, aws libreoffice, email to pdf, eml to pdf, eml to pdf api, emlx to pdf, lawyers, outlook to pdf, pdf-generationComments are closed.