How to Extract Statement of Assets using PDF.co Document Parser
In this tutorial, we will show you how to extract a Statement of Assets using Document Parser by PDF.co.
We will use this sample Statement of Assets and extract the sub-total value.
![Screenshot of Statement of Assets](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F7b452efc8e6431c296b6e6eae76a0df7253e7b02-999x514.png&w=2048&q=75)
Step 1: Open PDF.co Account
First, log into your PDF.co account and select Document Parser from the API Tools page.
![PDF.co Dashboard](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2Fedbe9c7fd698a15c671f5e406fcf856ec357f4eb-1159x722.png&w=3840&q=75)
Step 2: Create New Template
Click on the Manage Templates button.
![Manage Templates](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F26a5d6ce6d0d3aa97d8187d0a01e237f8bb3bbd1-1192x639.png&w=3840&q=75)
Next, click on the New Template button to create a new template.
![Create a New Template](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F16dc5ba4404ed34bb417b7173ea435ae9c92aefa-1201x742.png&w=3840&q=75)
Step 3: Load Test PDF
On your Document Parser Template Editor, click on the Load Test PDF button to load the source file.
![Load Test PDF](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F9a273e81f63f7320b3664ae7f048c63ffea098de-999x411.png&w=2048&q=75)
Step 4: Add Object
After loading the source file, click on the Add Object button and choose the Add Field from Text Search object.
![Add Object](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F8ffa825ce9d0378c660c7ffe1418cd72cf1bff6d-999x315.png&w=2048&q=75)
Step 5: Set Object Properties
Let’s set up the expression.
- In the Expression field, type
Subtotal{{Spaces}}({{Digits}})
to get the subtotal value. You can use the Insert Macro to fill out the expression. - Then, put a checkmark on the Regex box to capture everything inside the parenthesis and display it as a result.
![Set Object Properties](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F35dd5cd30b97a1143c17ce3178176e3afb8f385d-1909x955.png&w=3840&q=75)
Step 6: Run Template
Now, click the Run Template button to see the result.
![Run Template](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2Fea14a404d2eaeeee9d01c57f93ef4bd73da3f67a-999x497.png&w=2048&q=75)
Step 7: Parser Result
Here’s the extracted subtotal value from the Statement of Assets.
![Parser Result](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2Fad0a72e62f3c9dae84cdbe153764284d6c7deac8-999x417.png&w=2048&q=75)
Step 8: Save Template and Return
Once you’re done creating the template and getting the desired output. You may now save it.
![Save Template and Return](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F1e8f2d8576e9c6e7489a3d6abb759d31b0a404ee-999x507.png&w=2048&q=75)
In this tutorial, you learned how to extract a Statement of Assets using PDF.co Document Parser. You learned how to set up the object properties and extract data from the statement. You also learned how to create a new template using the PDF.co Document Parser Template Editor.