Forum Discussion

Krishna_Kumar's avatar
Krishna_Kumar
Contributor
6 years ago

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

 

    • Krishna_Kumar's avatar
      Krishna_Kumar
      Contributor

      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

      • shankar_r's avatar
        shankar_r
        Community Hero
        // 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.