Friday, April 26, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 532  / 1 Year ago, thu, december 22, 2022, 9:40:30

I have taken up a task of manually generating Library essential data from huge pdf library; what I want is: use a script with file names, to open a pdf file instance, review it and after I close current instance subsequent pdf instance is started. Is this possible.
This doesnt talk about using filenames list.


More From » command-line

 Answers
5

Given a file with a filename per line, you could use this command:



while read file; do xdg-open "$file"; done < files.txt


You can replace xdg-open by the program of your choice, such as evince or okular.



If the PDF files are mainly text, you can also consider using the pdftotext command to convert PDF files to text files. In that way, you can use any text editor to review the contents. gedit and kate support tabs for example. Example:



while read file; do pdftotext "$file"; done < files.txt


This converts a PDF file such as foo.pdf to a text file, foo.txt.



For more details on the command invocation of pdftotext, see its manual page pdftotext(1).


[#24678] Friday, December 23, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
termetalli

Total Points: 326
Total Questions: 127
Total Answers: 110

Location: Sao Tome and Principe
Member since Sat, Sep 12, 2020
4 Years ago
;