Bash and multiple pdf
Posted: 2019-05-01T23:23:16-07:00
Hi,
so here is what I'm trying to do. I have a bunch of PDF files called:
67123_001.pdf
67134_001.pdf
which are multiple page pdfs.
I would like to convert them to single page .tif files and keep the first number of the name before'_' and increase the count after '_' for each page. So for example if "67123_001.pdf" has 3 pages, I would like to get the following result:
"67123_001.tif"
"67123_002.tif"
"67123_003.tif"
I also need a batch to do this, since I have > 40.000 documents.
I already have a solution for one part of the problem: a good resolution when converting pdf to tif and a count for the single pages when I split the pdf file. I still haven't figured out how to write a batch and how to keep the first part of the name. Here's what i git so far:
Thanks for your help!
so here is what I'm trying to do. I have a bunch of PDF files called:
67123_001.pdf
67134_001.pdf
which are multiple page pdfs.
I would like to convert them to single page .tif files and keep the first number of the name before'_' and increase the count after '_' for each page. So for example if "67123_001.pdf" has 3 pages, I would like to get the following result:
"67123_001.tif"
"67123_002.tif"
"67123_003.tif"
I also need a batch to do this, since I have > 40.000 documents.
I already have a solution for one part of the problem: a good resolution when converting pdf to tif and a count for the single pages when I split the pdf file. I still haven't figured out how to write a batch and how to keep the first part of the name. Here's what i git so far:
Code: Select all
convert -density 300 67123_001.pdf -depth 8 -strip -background white -alpha off output_%03d.tif