New: PDF/A-3b conversion with a compliance report included.See Docs

Extract Text from a PDF into an XML File Using Zapier

10 Minutes Read

Convert new PDFs in a Google Drive folder into XML files using PDF.co and Zapier, then save the results to Google Drive.

The XML output contains extracted text and information such as fonts and text positions. Text within tables may also be included. See the PDF to XML documentation for details.

Step 1: Set Up the Trigger

Create a Zap and select Google Drive → New File in Folder.

Connect your Google Drive account and choose a folder for incoming PDFs. Keep this folder dedicated to PDF files.

Upload a sample PDF and test the trigger. Confirm that Zapier retrieves the file. This trigger monitors the selected folder, excluding its subfolders. Google Drive documentation

Step 2: Configure PDF.co

Add PDF.co → PDF to Anything.

Connect your PDF.co account by signing in and authorizing Zapier when prompted.

Configure these fields:

  • Output Format: Select the XML conversion option.
  • Source PDF URL: Map the File output from Google Drive.
  • Page Selection: Leave blank to process all pages, or enter 0 for the first page.
  • Output File Name: Enter result.xml.
  • Inline Output Option: Select No / false to receive a downloadable XML file.
  • OCR Language for Scanned Documents: Select the document’s language if it contains scanned text.

For additional settings, see the PDF to Anything documentation.

Step 3: Test the Conversion

Test the PDF.co action and open the returned url to view or download the XML.

Compare the extracted content with the source PDF. Check that the required text and selected pages are included.

Step 4: Save the XML File

Add Google Drive → Upload File and configure:

  • Folder: Choose an output folder separate from the incoming PDF folder.
  • File: Map PDF.co’s output url.
  • File Name: Enter result.xml.

Test the action and confirm that the XML file appears in the destination folder. Google Drive Upload File documentation

PDF.co’s output URL is temporary; saving the file to Google Drive retains a copy.

Step 5: Publish the Zap

Publish the Zap after both actions pass their tests.

Upload another PDF to the incoming folder and confirm that its XML output is saved automatically.

In this tutorial, you learned how to extract text info from PDF and turn it into an XML file using PDF.co and Zapier. You also learned how to set up the PDF to Anything Converter module that supports PDF to Text, XLS, CSV, JSON, XML, and Images formats conversion.

Related Tutorials

See Related Tutorials