In this article, you’ll learn how to programmatically extract images from PDF files using Node.js and the powerful GroupDocs.Parser Cloud REST API. Whether you’re building a content parser, data extraction tool, or document automation system, extracting embedded images from PDFs is a common requirement. This guide covers installation, usage and code snippets for easy image extraction.
Why Extract Images from PDF?
- Extract logos, infographics, and embedded photos from PDFs.
- Automate document digitization for archiving and data processing.
- Build custom PDF analyzers or image recognition pipelines.
- REST API-based workflow — No need for desktop software.
In this article, we are going to cover following topics:
- PDF Processing API
- Extract Images from PDF using Node.js
- Extract Images from PDF via cURL
- Online Image Extractor
PDF Processing API
GroupDocs.Parser Cloud SDK for Node.js is a lightweight and easy-to-integrate API wrapper that allows developers to extract structured content—such as text, images, metadata, and document fields—from a wide variety of file formats including PDF, Word, Excel, and more.
Prerequisites Install the GroupDocs.Parser Cloud SDK for Node.js:
npm install groupdocs-parser-cloud
Create an account at the GroupDocs.Cloud Dashboard to obtain your Client ID and Client Secret for authentication. For further information, please visit this article.
Extract Images from PDF using Node.js
Follow these steps to develop your own image extractor from PDF using Node.js API:
Step 1: Set up Configuration.
const { ParserApi, Configuration, ImagesRequest, FileInfo, ImagesOptions } = require("groupdocs-parser-cloud");
const config = new Configuration("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET");
const parserApi = new ParserApi(config);
Step 2: Define PDF File Info and Image Extraction Options. Initialize an object of the ImagesRequest class and pass the instance of the ImagesOptions class.
const fileInfo = new FileInfo();
fileInfo.filePath = "sample.pdf";
const options = new ImagesOptions();
options.fileInfo = fileInfo;
const request = new ImagesRequest(options);
Step 3: Extract Images. Invoke the images method to extract images from PDF file.
parserApi.images(request).then((response) => {
console.log("Images extracted successfully.");
console.log(response.images);
}).catch((err) => {
console.error("Failed to extract images:", err);
});
You can see the output of the above code sample in the image below:

Extract Images from PDF via cURL
You can also extract images using GroupDocs.Parser REST API and cURL.
Step 1 – Generate Access Token:
curl -X POST "https://api.groupdocs.cloud/connect/token" \
-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET" \
-H "Content-Type: application/x-www-form-urlencoded"
Step 2 – Extract Images via REST API:
curl -v -X POST "https://api.groupdocs.cloud/v1.0/parser/images" \
-H "accept: application/json" \
-H "authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "{ \"FileInfo\": { \"FilePath\": \"Binder1.pdf\", \"StorageName\": \"internal\" }, \"OutputPath\": \"internal\", \"StartPageNumber\": 1, \"CountPagesToExtract\": 2}"
- Replace <ACCESS_TOKEN> with the one you generated.
Online Image Extractor
If you’re looking for a no-code solution, you can use the Free Online PDF Image Extractor powered by GroupDocs.Parser Cloud.

Conclusion
The GroupDocs.Parser Cloud SDK for Node.js makes extracting images from PDF documents fast, scalable, and code-friendly. Whether you’re building automation scripts, content crawlers, or image-based analytics tools, this REST API offers everything you need to isolate and export images programmatically.
Ready to integrate it into your workflow? Get started with your first API call today!
📚 Additional Resources
Frequently Asked Questions – FAQs
How do I extract images from Word?
You can use GroupDocs.Parser Cloud SDKs to extract images from PDF files programmatically. Please visit this link for further details.
What is the pricing model?
We offer a single pay as you go pricing model. For further information, please visit pricing guide.