Parse an Order Form using Document Parser
- Go to PDF.co Document Parser
- Create a New Template
- Load Source PDF or Image
- Add Objects
- Add Properties and Expression
- Run Template
- Result
- Save Template
In this step-by-step tutorial with screenshots, you will learn how to parse an order form with line items and total using Document Parser.
We have this sample order form that we’re going to use for this tutorial:

First, go to your dashboard by logging in to your PDF.co account.
Step 1 – Go to PDF.co Document Parser
- Click on the Document Parser menu at the top of your dashboard
Step 2 – Create a New Template
- To create a new template. Click new template
Step 3 – Load Source PDF or Image
- Load the source PDF or image that you’re going to use
Step 4 – Add Objects
- To get the Line Items, choose Add TABLE field based on TEXT SEARCH
- To get the Total, choose Add FIELD based on TEXT SEARCH
Step 5 – Add Properties and Expression
- To get the Total with the object Add FIELD based on TEXT SEARCH. Set the Expression to
Total{{Anything}}(?<value>{{Number}}).
Make sure to check the Regex check box and change the DataType to Decimal or Currency. - To get the Line Items with the object Add TABLE field based on TEXT SEARCH. Set the Properties to:
-
{ "start": { "expression": "({{LineStart}})(?=Order #:)", "regex": true }, "end": { "expression": "Total Order Amount", "regex": true }, "introduction": { "expression": "{{ToggleSingleLineMode}}Order #:{{Spaces}}(?<OrderNo>{{Digits}}){{Anything}}Site:{{Spaces}}(?<Site>{{SentenceWithSingleSpaces}}){{Anything}}Date:{{Spaces}}(?<Date>{{SmartDate}})", "regex": true }, "row": { "expression": "{{LineStart}}{{Spaces}}(?<Quantity>{{Digits}}){{Spaces}}(?<ItemNo>{{Digits}}){{Spaces}}(?<ItemName>{{SentenceWithSingleSpaces}}){{Spaces}}(?<Price>{{Number}}){{Spaces}}(?<LineTotal>{{Number}}){{LineEnd}}", "regex": true }, "columns": [ { "name": "Date", "dataType": "date", "dateFormat": "auto-YMD" }, { "name": "Quantity", "dataType": "integer" }, { "name": "Price", "dataType": "decimal" }, { "name": "LineTotal", "dataType": "decimal" } ] }
-
Step 6 – Run Template
- Once you’re done adding the necessary objects for your template. It’s now time to run it
Step 7 – Result
- Here’s the result

Step 8 – Save Template
- Once you’re done creating your template. You may now save it
You learned how to parse an order form with line items and total through this tutorial.