How to Extract PDF to CSV with PDF.co API and Postman

Sep 2, 2024·4 Minutes Read

Learn how to convert PDF to CSV using PDF.co Web API and Postman. Follow this step-by-step tutorial to extract PDF files to CSV format.

IMPORTANT: You need to set up Postman first. Use our guide to set up PDF.co for Postman.

Step 1: Open PDF.co API v.1

Go to Collections Tab and click on PDF.co API v.1 folder

PDF.co Postman API

Step 2: Select PDF Text and Tables Extraction

Look for and click on PDF Text and Tables Extraction subfolder

PDF Text and Tables Extraction Folder

Step 3: Select PDF to CSV

Click on PDF to CSV subfolder and click Get /pdf/convert/to/csv

PDF to CSV Endpoint

Step 4: Send Request with cURL or with Postman

Option 1: You can send your request with cURL

curl --location --request POST 'https://api.pdf.co/v1/pdf/convert/to/csv' \
--header 'Content-Type: application/json' \
--header 'x-api-key: INSERT_YOUR_API_KEY_HERE' \
--data-raw '{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-csv/sample.pdf",
"lang": "eng",
"inline": "true",
"unwrap": "",
"pages": "0-",
"rect": "",
"async": "false",
"encrypt": "false",
"name": "result.csv",
"password": "",
"lineGrouping": "",
"profiles": ""
}'

Option 2: You can send it with Postman by going to the Body tab and selecting Form-Data

PDF to CSV Body

Step 5: Enter CSV File URL and File Name

Enter your CSV file URL in URL values and your desired file name on Name values.

PDF to CSV url and name

Optional Step:

Enter your PDF file password on the password‘s value for password-protected PDF files. You can set a range for specific PDF file pages that you want to be converted. The first page starts at 0, use dash (-) to set range i.e 2-5 for pages 3 to 6 and 2- for pages 3 to last, otherwise leave the field empty.

PDF To CSV Password

Step 6: Send then Check the Status

6a. Click on the Send button

Send Button

6b. Scroll down and make sure that the Status is 200 OK.

200 OK Status Code

Step 7: Copy and Paste URL to Browser

Copy the URL and paste it in your browser’s address bar to see your converted HTML Code to PDF.

PDF To CSV Result URL

The CSV file is temporarily stored in the cloud and will expire in an hour. Be sure to download/move it to permanent storage.

Now, you’ve learned how to quickly convert PDF to CSV using PDF.co Web API and Postman.

Video Guide

Related Tutorials

See Related Tutorials