I have a lot of pdf
files (3308) on which I must apply four steps:
1) I have to convert all to jpg
I found this little script on the web with ImageMagick: batch converting pdf to jpg
I want to do this, but I keep my files the same name as before: foo.pdf
=> foo.jpg
Also I would like all images are saved in a folder in "scenes"
2) Then I have to resize to 612x792
3) Then I have to create thumbnails in 255x330
4) Finally I have to rename them. Indeed, I have a csv
file in which is their names and new names
Here is an example of some lines.
Each line corresponds to the "actual name" file "comma" "the new name." There are 3308 rows, one per file
current_name,new_name
foo,bar
PS130_1060,55-large
As you can see, the extensions are not displayed because the two files are in jpg
format.
I am completely lost, I do not know whether to use 4 scripts or if it is possible in one script. I often work in PHP, but I wanted to do a bit of bash to change, but it's a bit hot for me.
Can you help me?