Convert a PDF to XML Using PDF.co and Make
This tutorial shows how to download a PDF from Google Drive, convert it to structured XML with PDF.co, and save the resulting XML file.
The XML output can include extracted text, table structure, font details, and object positions. Image output depends on the selected conversion settings.
Prerequisites
- A PDF.co account
- A Make account
- A PDF stored in Google Drive
Step 1: Create a Make Scenario
Sign in to Make and create a new scenario.
Add Google Drive as the first module and choose Download a File.
Step 2: Select the Source PDF
Connect your Google Drive account, then select the PDF you want to convert.
You can select the file directly or map its file ID from an earlier module if the scenario is part of a larger workflow.
Run this module once and confirm that it returns the PDF’s file data.
Step 3: Add PDF.co
Add another module and select PDF.co.
Choose Convert from PDF and connect your PDF.co account.
Configure the module:
- Import Options: Select Upload a File.
- Source File/Data: Map the file data returned by Google Drive.
- Convert Type: Select PDF to XML.
- Output File Name: Enter a name such as
converted-document.xml. - Export Type: Select Download a File if the XML will be passed to another Make module.
Leave the remaining settings at their defaults unless you need to process specific pages, enable OCR, or customize the XML output.
Step 4: Test the Conversion
Click Run once to test the scenario.
PDF.co will convert the PDF and return the XML output. Review the module’s output to confirm that the conversion completed successfully.
For scanned documents, PDF.co can apply OCR during conversion. Select the appropriate OCR language if the source document is not in English.
Step 5: Save the XML File
To store the result permanently, add Google Drive – Upload a File after PDF.co.
Configure it as follows:
- Select the destination folder.
- Map the file data returned by PDF.co.
- Map the output file name or enter a name ending in
.xml.
Run the scenario again and confirm that the XML file appears in Google Drive.
Conclusion
The completed scenario downloads a PDF from Google Drive, converts its contents and document information into XML with PDF.co, and saves the generated XML file.
For additional conversion options, see the PDF.co PDF-to-XML documentation.
Related Tutorials

