question

TurtleRock avatar image
TurtleRock asked ericnute converted comment to answer

Can we Read PDF Files as a normal text file.

HI,

 

I need to read a PDF file using iTest. When I tried to read it through "readFile", content was encrypted. 

 

       Is there any way we can read as a normal text file, or decrypt the content read by iTest.

 

 Regards

 TurtleRock

iTestreadfile
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

PaulD avatar image
PaulD answered ericnute converted comment to answer

If you search the internet, you'll find a number of tools that can extract text from PDF.  In iTest, you can use one step to run such a tool (using the Process or CMD application) and then use readFile to pull in the resulting text file.

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

TurtleRock avatar image TurtleRock commented ·

Thanks PaulD

 

As per you suggestion I downloaded one utility ("Convert Doc") which supports command line for converting PDF to Text. I am converting the PDF to a text file using this utility and then reading the text file using readFile Action.  

 

Its working fine. 

 

 

Regards

Turtle Rock


0 Likes 0 ·
rbaswareddy avatar image
rbaswareddy answered ericnute converted comment to answer

As far as I know we cannot read a pdf file and ReadFile only reads text files.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.