cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlexMB
Advocate I
Advocate I

Multipage PDF - last or second to last page

I'm using the guide here to extract data from a multipage PDF.

 

My PDF looks like this one in the link, except I have a footer on the last and sometimes second to last page.

table-page-1.pngThere's crucial information in the footer, but I can't use the solution given in the Extract fields for specific pages section since I don't know:

a) How many pages are in the document

b) Which page my information is on

 

How can I solve this? I've tried using a few different methods and while I can extract the data I can't get i to paste along with each line.

1 ACCEPTED SOLUTION

Accepted Solutions
JoeF-MSFT
Power Apps
Power Apps

Hi @AlexMB,

 

Here is one possible way:

 

1. Define at the beginning of the flow a variable with the Initialize variable action for each of the additional items you want to extract which location can vary in the document. 

 

2. Define a condition after the Extract information form forms action that checks if the field you want to retrieve is empty or not (is not equal to null). If it's not empty, the condition should store that field in the the variable you defined on the first step.

 

Here is an example to better illustrate this:

 

JoeFMSFT_0-1643475384299.png

 

At the end of the flow, you will have the value you want to keep in the variable.

 

I hope this helps!

 

View solution in original post

2 REPLIES 2
JoeF-MSFT
Power Apps
Power Apps

Hi @AlexMB,

 

Here is one possible way:

 

1. Define at the beginning of the flow a variable with the Initialize variable action for each of the additional items you want to extract which location can vary in the document. 

 

2. Define a condition after the Extract information form forms action that checks if the field you want to retrieve is empty or not (is not equal to null). If it's not empty, the condition should store that field in the the variable you defined on the first step.

 

Here is an example to better illustrate this:

 

JoeFMSFT_0-1643475384299.png

 

At the end of the flow, you will have the value you want to keep in the variable.

 

I hope this helps!

 

Thanks @JoeF-MSFT !

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,216)