cancel
Showing results for 
Search instead for 
Did you mean: 

Reading PDF files line By Line

Highlighted
Contributor

Reading PDF files line By Line

Hi Everyone,

 

I want to get the PDF text Line by line using javascript.

can anyone help me regarding the same.

 

Kind Regards,

Sathish Kumar K

 

5 REPLIES 5
Highlighted
Community Hero

Re: Reading PDF files line By Line

You can extract data from the PDF file by following the steps in the below link

https://support.smartbear.com/articles/testcomplete/testing-pdf-files-with-testcomplete#Extr_Data_pd...


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

Highlighted
Contributor

Re: Reading PDF files line By Line

I wanted to print the first 10 lines of the PDF document  and hence i need to read data line by line.

in the above line i didn't find any references, can you please check and tell me

 

Regards,

Sathish KUmar

Highlighted
Community Hero

Re: Reading PDF files line By Line

// Set the start page (note that the page index is not zero-based)
textStripperObj.setStartPage(1);

// Set the end page
textStripperObj.setEndPage(1);

// Get the text of the specified pages
text = textStripperObj.getText_2(docObj);

In the above code, you can get particular page text and see how are you getting data, based on this you will get some idea about how you can get the required data.

 

There is no prepaid solution for your question, This is just a way to get your analysis.


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

Highlighted
Valued Contributor

Re: Reading PDF files line By Line

Hi,

In a first time I would extract all the PDF text into a textfile using PdfBoxDotNet.

Then, in a second time, I would browse the textfile and flush only the first ten lines into a second textfile.

Highlighted
Contributor

Re: Reading PDF files line By Line

 

 

 

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors