Parse Amazon AWS Invoice using Document Parser

  1. Go to PDF.co Document Parser Page
  2. Create a New Template
  3. Load Source File
  4. Add Objects
  5. Setup Objects
  6. Run Template
  7. Result
  8. Save Template

In this step-by-step tutorial with screenshots, you will learn how to parse an Amazon AWS Invoice using PDF.co Document Parser.

We have here a sample Amazon AWS Invoice that we can use for this tutorial.

Screenshot of Sample Amazon AWS Invoice
Screenshot of Sample Amazon AWS Invoice

Start by logging in to your PDF.co account.

Step 1 – Go to PDF.co Document Parser Page

  • On your PDF.co Dashboard, click the Document Parser menu at the top of the page

Go to PDF.co Document Parser Page

Step 2 – Create a New Template

  • Click New Template to create a new template

Create a New Template

Step 3 – Load Source File

  • Load the Source PDF or Image File that you’re going to use

Load Source File

Step 4 – Add Objects

  • To get the Total, Sub Total, Date Issued, and Invoice ID. Select Add FIELD based on TEXT SEARCH object
  • To get the Company Name, Company Website, and Currency. Select Add FIELD with STATIC value object
  • To get the Bill To Address. Select Add FIELD from RECTANGLE selection object
  • To get the Table Value. Select Add TABLE field based on TEXT SEARCH object

Add field based on text search object

Add field with static value object

Add field from rectangle selection object

Add table field based on text search object

Step 5 – Setup Objects

  • Set the Expression for Sub Total to {{LineStart}}{{Spaces}}Charges{{Spaces}}{{Dollar}}({{Number}}) and change the Data Type to Decimal or Currency
  • Set the Expression for Date Issued to Invoice Date:{{Spaces}}({{Anything}}){{LineEnd}} and change the Data Type to Date
  • Set the Expression for Invoice ID to Invoice Number:{{Spaces}}({{Digits}}) and change the Data Type to String
  • Set the Value of your Company Name, Company Website, and Currency 
  • Select a Rectangle Area, set Expression to Bill to Address:{{ToggleSingleLineMode}}({{AnythingGreedy}}), and change the Data Type to String
  • Add these following Properties for the Table Value:
    • {
      "start": {
      "expression": "{{LineStart}}{{Spaces}}Detail{{LineEnd}}",
      "regex": true
      },
      "end": {
      "expression": "{{EndOfPage}}",
      "regex": true
      },
      "row": {
      "expression": "{{LineStart}}{{Spaces}}(?<description>{{SentenceWithSingleSpaces}}){{Spaces}}{{Dollar}}(?<unitPrice>{{Number}}){{LineEnd}}",
      "regex": true
      },
      "columns": [
      {
      "name": "unitPrice",
      "dataType": "decimal"
      }
      ]
      }

Setup expression and data type for sub total

Setup expression and data type for date issued

Setup expression and data type for invoice id

Set value for company name, company website, and currency

Select a rectangle area, set expression, and data type for bill to address

Set properties for table value

Step 6 – Run Template

  • After setting up the objects you may now run the template

Run template

Step 7 – Result

  • Here’s the output using your template
Output using the Template
Output using the Template

Step 8 – Save Template

  • Once you’re done creating your template, you may now save it

Save template

With the help of this tutorial, you’ve learned how to parse Amazon AWS Invoice using PDF.co Document Parser.

Related Pages:

Related Samples: