I have 50 PDFs files and I want to extract first page of each file i do not know how it is to be done? kindly help me for this problem.
1 Answer
many ways to skin a cat. You are on windows? First install cygwin from cygwin.org.
Install pdftk from here https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
then open a cygwin shell
pdftk (pdf toolkit) is open source and can extract a given page.
if you write these 4 lines code into a file called get-page-one.sh (you'll have to change the path to the pdftk.exe executable)
#/bin/bash
for i in *pdf; do
/path/to/pdftk.exe "$i" cat 1 output "new-$i";
done;
then run it with sh get-page-one.sh
it will create a new pdf prefixed with new- for every pdf in the directory you are in. Stuff all your pdfs into the same dir first.
Pingers