PDF.co is an application programming platform for PDF, Barcodes, Data Extraction, etc. It can also extract PDF data from various documentation using smooth and accurate data processing and fast PDF to XML conversion. Using Postman and PDF.co Web API will help to automate data extraction in the easiest way. Postman is an API platform that allows you to create and use APIs.

This tutorial will explain how you can extract bold text from PDF documents using PDF.co and Postman. We will use the PDF.co PDF to XML API to make this extraction easier. Below, you will see the sample PDF document that we use in this tutorial.

  1. Open Postman Editor
  2. PDF to XML API Collections
  3. Add Headers and Body Parameters
  4. Request Result
  5. PDF to XML Output
Sample PDF Document
Sample PDF Document

Here’s the step-by-step guide to extracting bold text in a PDF document.

Step 1: Open Postman Editor

  • First, open the Postman editor and click on the PDF.co Postman Collection. If you haven’t set up your PDF.co Postman Collection yet, you can check out our step-by-step guide here.

Step 2: PDF to XML API Collection

  • Next, click the PDF to XML folder in the PDF.co API v.1.00 collection and open the POST/pdf/convert/to/xml. The PDF to XML API can extract bold text from a PDF document and also convert PDF to XML with information about text value, tables, fonts, images, and object positions.

PDF to XML API Collection

Step 3: PDF to XML Headers and Body Content

Now, let’s add the Headers and Body values.

  • First, click the Headers param and add the value of PDF.co API Key. You can get the API Key by logging in or signing up to PDF.co.
  • Next, click the Body param and input the direct URL of your source PDF file. You can also use the default URL in the body param.
  • After setting up the Headers and Body param, click the Send button to send a request to PDF.co.

Headers Content Value
Body Content Value

PDF to XML Web API cURL Code Snippet

curl --location --request POST 'https://api.pdf.co/v1/pdf/convert/to/xml' \
--header 'x-api-key: {{x-api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-xml/sample.pdf"
}'

Step 4: Request Result

  • Great! PDF.co process our request successfully. Click on the resulting URL to view the output.
  • For the Name param, enter your preferred output file name.

Request Result

Step 5: PDF to XML Output

  • Here’s the extracted bold text from the PDF document in XML format using PDF.co and Postman.
Extracted Bold Text in XML Format
Extracted Bold Text in XML Format

In this tutorial, you learned how to extract bold text from a PDF document using Postman. You also learned how to use the PDF.co PDF to XML API to extract bold text in a PDF.

Related Pages:

Related Samples: