Create thumbnail images of PDFs and Office Files with REST API
Create thumbnail images of PDFs and Office Files with REST API
If you are building an application that requires you to generate an image thumbnail of a PDF or Microsoft Office file (Word, Excel, Powerpoint, etc), then you can get started with API2PDF in minutes using our /libreoffice/thumbnail endpoint. We are running LibreOffice on our API and it will take the first page of your document and generate an image of it.
Create an account and check out our documentation to get started for free.
We also offer client libraries in popular languages:
Otherwise, you can write very simple code against the REST API. Below is a simple thumbnail generation example using Python.
#python example
import requests
import json
api_key = 'your-api-key'
endpoint = 'https://v2.api2pdf.com/libreoffice/thumbnail'
url_to_file = 'https://url-to-your-file-goes-here'
api_response = requests.post(endpoint, json={'url': url_to_file }, headers={'Authorization': api_key})
print(json.loads(api_response.content)['FileUrl'])
We run our service on Google Cloud Run which offers some huge benefits. First, we do not have any rate limits, unlike other services out there. Hit the API as many times as you wish. And second, the cost to service the API is substantially less, resulting in much lower fees than competing services.
Our API is also available as a standalone docker container that you can run in your own cloud environment. Contact us if you are interested in learning more.