Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Extract Text From Structured PDF

Hi RPA Community,

I have this PDF file that i want to extract its text. The PDF will be in a structured form and the output text file should follow the structure accordingly. Can someone give advice on which approach should i use in order to get the correct output.


I will share you the sample PDF and the desired text format once extracted 


Appreciate your time and assistance,

Thanks and Regards,



Responsive Resident
Responsive Resident

Hi @yoko2020 ,

Thank you for your suggestion, does this mean i need to rely on AI builder or any other 3rd party software service in order to get the extracted text for my situation?

I was hoping that there is a way to get my desired output using commands that are available in PAD.


Thanks and Regards,


Responsive Resident
Responsive Resident

I never use parse/regex action or extract text from pdf action  from PAD when dealing with invoice, sales order, custom form document (pdf/image) extraction, always use third party software specialized for this purpose.


Things to consider when dealing with this stuff :

1. Does the document always come in text pdf ?

2. What happen if document come in image pdf ?

3. Are we dealing with  =>1000 of documents per month or just 10 documents per month ?

4. What if in 1 document contain multiple invoices that need to be separated ?

    See this video what i mean about document separation/invoice splitting

5. And sometimes invoice contain multiple page, so we are facing dynamic invoice pages that need to be processed.



Most of this software can handle invoice splitting except power automate aibuilder.

If you only process small quantity you can try use internal PAD action, but make notice of those 5 points or else your project will stuck in the future.






Super User
Super User

Hi @yoko2020 

If the pdf is constant header means you can directly use regex.

first you need to us e action Extract text from PDF

After use parse text and use regex based on the required data.



Ahammad Riyaz

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Post Prodigy
Post Prodigy

"The PDF will be in a structured form and the output text file should follow the structure accordingly"

This makes no sense, surely your just pulling particular values rather than the whole pdf text ?


If particular values, yes it can be done wholly in PAD...


Screenshot 2022-03-29 140513.png

Hi @yoko2020 ,

I previously used regex and string manipulation to extract data from this pdf format. However, previously i used Automation Anywhere (AA) it can extract text in structured format so it was easy for me to extract the data line by line with string conditions. Right now I had to migrate to PAD so i find the extract text is not the same as AA and i find that the result is different than i expected. I will share you the output i got from using PAD extract pdf to text command.

Let me answer your question:-

1- Yes, for this file it will always come in readable pdf format as it is generated by a system.

2- If there is an image pdf file during extraction it will extract nothing so an error handling should be able to overcome that.

3- Yes, we are dealing with 1000+ documents per month.

4- No, there wont be any invoice combined together as the system will generate 1 invoice per order.

5- If there is multiple page i should still be able to extract all the necessary information if the text output is in a structured format.


Thanks and Regards,


Hi @Ahammad_Riyaz ,

Yes the pdf will have constant header and will repeat if there is multiple page of the invoice. I tried this approach but however the result i get from "Extract PDF to Text" is hard to implement the regex or string operations. This is probably due to the format of the pdf that's why the text result is cluttered and not in pair. I share with you the output i got from using the PAD Extract PDF to Text.

Is there any way for me to extract the text without using 3rd party applications or AI-builder for this?


Thanks and Regards,


Hi @UK_Mike ,

Yes i wanted to pull particular values, but the result i get from Extract PDF to Text is not organized and applying regex or string manipulation can be difficult as the value doesn't seem to be coming in pairs for this PDF file. If the text extracted is written by following the same format as the PDF then it is possible for me to extract the invoice details as well as the item details. I share with you the text output i get from PAD. As you can see, each value is hard to differentiate.

Plenty of field that i want to extract and evaluate and if the extracted text is coming in this format i can be quite troublesome for me to extract the details. I was hoping to find a solution for this without relying on 3rd party applications or AI-Builder as additional cost will incur and there are over 1000+ PDF invoices needed to be processed per month.


Thanks and Regards,




Yes i know that technique very well.

But i never use that method, wasting of time and double work in the future when dealing with >2000 document and 100 vendor (document layout)

Responsive Resident
Responsive Resident



what PAD version you use ? looks like action extract text from pdf has a bug, it does not keep indentation.

In that use you have to go for AI Builder, you can train and use for different vendor.



Yes, already finish long time a go, but not using AI Builder.

Well I extract the pdfs to a variable, not sure what you're extracting to ?

Line numbers cannot be relied on, one pdf could have the invoice date on line 20, next pdf on line 21, too unreliable.

When I have the read pdf text in a variable I then parse this variable with regex.

One regex per value required, Date, Amount, Customer etc.

The resulting variables from the parse then get written to Excel.

Im sure others have their own way of doing it but im trying to avoid Ai builder or any 3rd parties.

I see in the latest PAD update, pdf tables are catered for, not tried it yet, scared of updating 😂

I have a look now and again on the AI Builder forum, it is not the Holy Grail of Pdf data extraction.

I see @Ahammad_Riyaz  referred to this method, it works for me.


@yoko2020  , care to elaborate what software you use, more than 1, costs ?








Responsive Resident
Responsive Resident



Chronoscan Advanced version + Nuance Plug-Ins

ABBYY® FlexiCapture®

Artsyl’s docAlpha










Sorry @yoko2020 , as soon as I posted I seen your post further on up mentioning the software you used.

Thanks x 2 😂

Responsive Resident
Responsive Resident



You also can test using this 2 services if you want getting a headache every 1 minute. 😂


Azure Form Recognizer
Amazon Textract

Ermmmmmmmmmmmm...................... no thanks 😂

Hi @yoko2020 ,

I'm using PAD version free version not licensed, If this is a bug then i can get support for this issue. Can you share me your extract PDF to text result that you get from my file that i shared?


Thanks and Regards,



Hi @UK_Mike ,

For my situation, I'm still in researching phase of this project. Trying out the PDF extraction command. Previously i used Automation Anywhere (AA), the extract pdf to text wont store the extracted data to a variable however it writes on a text file. I can extract the details line by line and create conditions based on the counter variable.

What i can see when i was using PAD the extract pdf to text command will extract all details onto a variable. From that variable i can convert it to a list and begin my regex and string operations to find the necessary details in each line. If i am not mistaken do correct me if i'm wrong.

Just that the issue is when i use the extract PDF to text in PAD, the indentation of the pdf file is removed and is placed on a new line. This makes the data inconsistent even if all the pdf is in the same format.

Does this issue only happen to me can you share your Extract PDF to Text result from PAD so that i can confirm my situation?


Thanks and Regards,


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Top Solution Authors
Top Kudoed Authors
Users online (3,300)