How to Extract Bold Text from a PDF Using PDF.co and Make
This tutorial shows you how to convert a PDF into structured JSON, identify text marked as bold, and save the extracted text to Google Sheets using PDF.co and Make.
This workflow works best with digitally generated PDFs containing font information. Scanned documents may not retain reliable bold-style metadata after OCR.
What You’ll Need
- A PDF.co account
- A Make account
- A PDF stored in Google Drive
- A Google Sheet for the extracted text
Prepare a spreadsheet with columns such as File Name and Bold Text.
Step 1: Watch a Google Drive Folder
Create a new scenario in Make.
- Add Google Drive.
- Select Watch Files in a Folder.
- Connect your Google Drive account.
- Select the folder containing the source PDFs.
- Set the number of files to process during each run.
Add a sample PDF to the folder and run the module once so Make can retrieve its file information.
Step 2: Download the PDF
Add another Google Drive module and select Download a File.
Map the file ID from the trigger to the File ID field. This downloads the file data so it can be passed securely to PDF.co.
Step 3: Convert the PDF to JSON
Add the PDF.co app and select Convert from PDF.
Configure the module:
- Input File: Select Upload a File.
- Source File: Map the file from Google Drive – Download a File.
- Convert Type: Select PDF to JSON.
- Pages: Leave empty to process every page.
- Inline: Select Yes so the JSON is returned directly to the scenario.
Run the module once and inspect the output. The JSON contains the document’s text along with properties such as font name, font size, font style, color, and position.
Step 4: Parse the JSON
Add JSON – Parse JSON.
Map the JSON body returned by PDF.co into the JSON string field. Create the data structure using the sample output from the previous step.
The parsed structure contains nested page, row, and column collections. Each text object can include values such as:
{
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"text": "Invoice Total"
}Step 5: Iterate Through the Text Objects
Add iterator modules to process the nested collections:
- Iterate through the document’s page array.
- Iterate through each page’s row array.
- Iterate through each row’s column array.
Run the scenario once if the nested fields do not immediately appear in Make’s mapping panel.
Step 6: Keep Only Bold Text
Add a filter after the final iterator.
Configure the filter to continue only when:
- Font Style contains
Bold - Text is not empty
Using “contains” also captures combined styles such as bold italic when they are present in the PDF.
Step 7: Combine the Results
Add Tools – Text Aggregator.
Select the final iterator as the source module and map the text value from each matching object. Use a new line as the row separator.
The aggregator combines all matching text into one result for each processed PDF.
Step 8: Save the Bold Text
Add Google Sheets – Add a Row.
Map:
- The original Google Drive filename to File Name
- The Text Aggregator output to Bold Text
Run the scenario and confirm that the spreadsheet contains only text identified as bold in the PDF.
Step 9: Activate the Scenario
Set the scenario’s schedule and activate it. Each new PDF added to the selected Google Drive folder will be converted to JSON, filtered by font style, and recorded in Google Sheets.
You’ve learned how to extract bold text from HTML or PDF files using PDF.co and Make with this tutorial.
Related Tutorials
