Extract a page from a pdf file with several pages

How to extract a page from a pdf file with several pages
The page I want to extract still has the same header, but the page is scanned.
I also want the scanned document to be set straight, since it looks like a table with data, straighten it to retrieve the data more easily.

Thank you in advance for any advice you can give me.

HI @kaj

Follow this steps :

1.Take assign activity and create a variable str_MacthingPage = 0 like this.

2.Take the “Get PDF Page Count” activity from the activity and create a variable = strpagecount
3. Take for each activity to find the matching page in that particular pdf
pass the condition like this

   ```
     Enunerble.range (1,strpagecount)
   ```
  1. Inside the for each you can “Take Read Pdf Text” Activity and create a variable = strReadPdfText.

  2. Take if activity and pass the condition like this

          strReadPdfText.contains("YourText")

Then - Section
Take the assign activity and pass the condition like this

         str_MacthingPage =  currentitem  (of for  each activity)

6.In the if condition and then section use the break activity to break the loop.
7.Out of for each activity use the “Extract PDF Page Range activity” and provide the pdf path and where need to be store and in the range you can mention like this

          str_MacthingPage.tostring

**

Note : - you need to know the difference of all pages and that particular page and find out the text which is main in that pdf and that text is not match rest of all pages

**

1 Like

Hi @kaj ,
You can set range in " read pdf " or " read pdf ocr"

image

image

select page 1
regards,

Hello @Praveen_Mudhiraj

Thank you for your explanation

I don’t understand how to make a loop, what to put in the for each?

Hi @kaj

you can try this xaml

Xaml : - SplitPdfs.zip (2.0 KB)

Note : - you need to pass the file path in three places
1. Get PDF Page Count Activity
2.Read PDF Text Activity
3. Extract PDF Page Range Activity and in the Extract PDF Page Range you need to mention the folder path for storing the spited PDF.

1 Like

The xaml is not working document is invalid

Sorry @Praveen_Mudhiraj

ok i will send again then

@kaj

1 Like

Hi @kaj

Noe you can try this xaml

Xaml : - Split pdfs.zip (2.9 KB)

Note : - you need to pass the file path in three place s

1.Get PDF Page Count Activity

2.Read PDF Text Activity

3.Extract PDF Page Range Activity and in the Extract PDF Page Range you need to mention the folder path for storing the spited PDF.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.