Hi,
Which activity can used to find a specific text (e.g. “Welcome”) in pdf without extracting text from pdf.
=> Use Read PDF text activity to read the PDF and store the output in a variable say str_text.
=> Use an If condition and give below condition:
If
Str_text.ToString.ToUpper.Contains( "WELCOME")
Then
// Do required process
Else
// Do required process
End If
Hope it helps!!
Unfortunately, no out of the box activity. You will have to extract text and then check for the desired value.
Thanks,
Ashok ![]()
Thanks Parvathy. But, text should find without extracting pdf for validating the ‘.pdf’ file whether native or scanned.
Unfortunately there is no such way to do.
One way is
=> Use Read PDF Text to read the PDF and store the output in a variable say str_text.
=> Use below condiiton in If
If
(Not String.IsNullOrEmpty(str_text) or Not String.IsNullOrWhiteSpace(str_text)) AND str_text.ToUpper.Contains("WELCOME")
Then
\\ your PDF is not an scanned PDF and proceed with further actions
Else
\\ your PDF is an scanned PDF and proceed with further actions what you want to do.
End If
Hope it helps!!
I got the result. Thank you.
Hope your query is resolved. If yes, please mark my post as solution to close the loop or if you have any more queries, I’m happy to help.
Regards
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.