Skip to Content
Technical Articles
Author's profile photo Simardeep Singh

PDF data extraction in SAP Intelligent RPA – Part 2 (Advanced Activities + Filters)

This blog post is in continuation to PDF Extraction Part 1 part of the SAP Intelligent RPA 2.0 Best Practices Series

Introduction

PDF SDK can be used to extract data from machine readable documents using various convenience activities. As discussed in the previous Blog Post,core activities are the simple activities that returns the result as text and not in complex format.

In this article, we will discuss about Advanced activities which returns output in complex format and how Filters which can be used to restrict the text extraction to a specific part of page.

We have seen previously that the fields can be extracted using simple activities but the problem arises when the data is in a complex format like table or matrix. Advanced activities solves such problem in a convenient way by providing customizable parameters.

Sample Document

 

Advanced Activities

The problem of extracting table data is solved using an advanced activity called Get Table Column Entries. This activity allows the extraction of table data using different configurable parameters.

Column header serves as the starting point of the extraction which in our case is Answer and text below table is the stopping point.

Text Below table is optional and is only required when there is some more text after the table. To make the extraction more precise, add some left and right offset.

As seen in the above example, Answer column is extracted with all the cell values inside it. textBelowTable parameter is empty because there is no text below the table.

 

Another advanced activity is Search Text Items activity. It returns a list of all text items with matching string. A Text Item contains word properties like dimensions, page number and index. These word properties can be used to create custom area filter which could restrict the extraction to a specific area of page.

In the above example, it grabs all the text items containing search string Name.Since text item is a complex return type, it provides different values associated with the text item like word, width, height and other properties.

There are few more Advanced Activities which can be used to retrieve text from PDF.

  • Get Text Items – Retrieves list of text items
  • Get Text Items in Area – Retrieves text items in a given area
  • Get Text in Area – Retrieves text in a given area
  • Get Text After Multiple Search Strings – Returns text after search string, multiple search strings can be provided
  • Get Text Before Multiple Search Strings – Returns text before search string, multiple search strings can be provided

Filters

Filters restricts the extraction to a specific part of the page. In this, if we want to restrict the activities, which can be core or advanced to a specific area of the page, we can apply filter just before the activities and the underlying activities will be restricted to extract from a specific part of the page.

In the above example, Filter Upper Half of Page activity will restrict the extraction to only upper half of the page. So, all the activities below this activity will be restricted to work on the filtered part of the page.

Filters can be cleared by using Clear Filters activity.

There are few more Filters which can be used to restrict the text extraction.

  • Filter Pages – Restrict extraction based on page selection
  • Lower Half of Page – Restrict extraction to lower half of page
  • Left Side of Page – Restrict extraction to left side of page
  • Right Side of Page – Restrict extraction to right side of page

Conclusion

By reading this blog post you learned about the advanced activities and filters. The following blog post we will go deeper into fields extraction from Invoices or Purchase Orders.

Thanks for reading and feel free to leave a comment with questions or feedback 🙂

 

Find more information on SAP Intelligent RPA:

Exchange knowledge: SAP Community | Q&A | Blog

Learn more: Webinars | Help Portal | openSAP

Explore: Product Information | Successful Use Cases

Try SAP Intelligent RPA for Free: Trial Version | Pre-built Bots

Follow us on: LinkedInTwitter and YouTube

Assigned tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sujata Jena
      Sujata Jena

      Hi Simardeep,

      Thanks for the blog it's very helpful.

      I am trying to extract one column entries in cloud studio using activity named "Get table column entries" but not getting any value.

      Can you please help me resolving this issue ?

      Author's profile photo Sujata Jena
      Sujata Jena

      this is the table of pdf.

      Author's profile photo Sidney Woods
      Sidney Woods

      Get Table Column Entries is an advance technology to extract the information from the pdf files. You can use this technology for the extraction of data tables and other important features from pdf files but I've this www.cocodoc.com site for best pdf services. I have used this application since a long time. It has been very useful.

      Author's profile photo Jakub Vanek
      Jakub Vanek

      Dear Simardeep,

      Thanks for the blog it's very helpful.

      Please is it possible extract data of all Items from PDF without table structure, every Invoice has a different amount of Items etc.. with some advance functionality of PDF library or SAP AI Document Information Extraction must be used?

      Thank you

      Jakub