Created
July 18, 2025 18:03
-
-
Save symisc/1b76bc13d249da453c4d0ed33f31c018 to your computer and use it in GitHub Desktop.
Convert PDF Document to image format using the PixLab PDFTOIMG SDK-Free REST API Endpoint - https://pixlab.io/endpoints/pdftoimg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert PDF Document to image format using the PixLab PDFTOIMG SDK-Free REST API Endpoint | |
fetch('https://api.pixlab.io/pdftoimg?src=https://www.getharvest.com/downloads/Invoice_Template.pdf&export=jpeg&key=PIXLAB_API_KEY') | |
.then(response => response.json()) | |
.then(reply => { | |
if (reply.status !== 200) { | |
console.log(reply.error); | |
} else { | |
console.log("Link to the image output (Converted PDF page): " + reply.link); | |
} | |
}) | |
.catch(error => console.error('Error:', error)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment