Question (Java) is either very simple, or very complex (I cannot determine from my own experience)
It is necessary to count the number of lines in the file (any text format). If it helps with java and txt:
private static void getStringCount(File file) { int i=0; String line=null; BufferedReader bufferedReader = null; try{ FileReader fileReader = new FileReader(file); bufferedReader = new BufferedReader(fileReader); while(bufferedReader.readLine()!=null) i++; System.out.println("СТРОК - " + i); bufferedReader.close(); }catch(Exception e){} } then to pdf, doc, etc., the numbers are not the same.
Does anyone know how this can be implemented? Do you really need to write a handler for each format and connect the library?