How to Extract an Image from a PDF Using PDF.co API Tester
In this tutorial, you’ll learn how to extract (crop) an image from a PDF file and save it as an image format (JPG, PNG, TIFF, or WEBP) using the PDF.co API Tester.
We’ll use a sample PDF and the PDF to JPG endpoint, but the same steps apply to the other PDF-to-image endpoints as well.

Step 1: Log in to Your PDF.co Account
First, log in to your PDF.co account.
Then, from the dashboard, go to: API Tools → API Tester

Step 2: Select the Correct Endpoint in API Tester
In the API Tester, use the left-hand menu to locate the image conversion endpoints.

Select one of the following endpoints depending on your preferred output format:
For this tutorial, we’ll use PDF to JPG.
Step 3: Provide the Input PDF URL
In the request parameters section, paste your input PDF file URL.
Important: Your input file URL must be publicly accessible, so the API can download and process it successfully.
Step 4: Define the Image Crop Area (Rectangular Area)
To extract a specific image from the PDF, you must specify the rectangular crop area using this format:
x, y, width, height

Example:
85, 285, 182, 243
This value represents the image area you want to extract from the PDF.
Step 5: Get Coordinates Using PDF Inspector
To easily get the correct crop coordinates, use the PDF Inspector tool:
https://app.pdf.co/pdf-inspector
How to use PDF Inspector:
- Upload the PDF file from your local device
- Click and drag your mouse to highlight the exact image area you want to extract
- The inspector will display the X, Y, Width, and Height values in the right panel
- Copy those values into the API Tester request

Step 6: Run the Request
Once the URL and crop coordinates are set, click Run Request in API Tester.
Step 7: View or Download the Output
If the request runs successfully, API Tester will return an output URL.
You can:
- open the URL to preview the extracted image, or
- download the output image file directly

Summary
In this tutorial, you learned how to extract (crop) an image from a PDF using PDF.co API Tester, and how to use PDF Inspector to get the correct crop coordinates (x, y, width, height).
