Using 'Get PDF Page Count" and get the total # of Pages Say IntPageCount
In the For each Loop, Enumerable.Range(1,IntPageCount) - This will loop through all the pages in the PDF…
Inside the For Each First, Read the PDF Text and output to StrPDFText
Next Assign Statement Match = System.Text.RegularExpressions.Regex.IsMatch(StrPDFText,“Invoice”,RegexOptions.IgnoreCase)
Match is Boolean Variable. Here i am looking for the word “Invoice”
If Match is true and It mean search word is found on that page, so do nothing or Print anything you want , In the else part using “PDF Splitter” from BalaReva Activities Split that Particular page where the match is not found
@maddy99…what is range of the read pdf activity? You should read page by page …for that, in the For each there is a Index component…declare a variable say IntIdx…Note: Index will always starts from 0. So in the read pdf property you have to set the range as (IntIdx+1).Tostring…same thing for PDfsplitter also
I have currently clean up…so if you run you will see 21 files gets created in the splitted folder and Final_output.pdf gets created outside/project folder.
I purposely did not give the xaml initially because, in this way you can do a setup by looking at the screenshot. This way you will understand what’s going on.
Now, you could have got the idea, how it is working? Its simple,
Read pdf page by page → convert it to text–> do a regex for match → If match ignore that page → else/no match split that page → Finally combine all the splitted pages…
Instead of creating additional counter variable, I used the one comes with For Each(index) so that i dont have to increment it. Index will automatically increment for every read.
Yes!! @prasath17… Learned how to read,remove and split pdf…and got total clarity after checking the shared flow…Thank you so much for your valuable time…