Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Converting pdf to jpg in multiple directories? Post 302755373 by martinsmith on Saturday 12th of January 2013 11:01:13 PM
Old 01-13-2013
Ubuntu [Solved] Converting pdf to jpg in multiple directories?

Hi!

On my Ubuntu I have thousands of files in a couple hundred directories. I'm trying to convert the pdf's to jpg's.

I used this command in terminal:
Code:
for fname in *.pdf; do convert $fname ${fname%.pdf}.jpg; done

It works great but the problem is I have to run this in terminal for each folder/directory so it's time consuming.

Is it possible to covert all the pdf's in the sub directories from the root directory at once in terminal?

Thanks for your help

Moderator's Comments:
Mod Comment Please use code tags next time for your code and data.

Last edited by radoulov; 01-13-2013 at 04:36 PM.. Reason: Marked as solved.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

PDF/EPS to GIf/JPG Help!!

Hello. I have a large number of EPS files and a lesser number of PDFs that I need to convert to GIFs/JPGs using a Unix system. Is there a unix utility or application out there that can do this conversion? Thank you in advance for any help you can provide. -Pook (1 Reply)
Discussion started by: PookJP
1 Replies

2. Shell Programming and Scripting

Converting ps file to pdf

I have a number of post script files (*.ps) which I need to convert into Pdf. I am using the ps2pdf command for this, but the trouble is that this commands takes only one input at a time. So the command ps2pdf *.ps doesnt work. how can I make a script which will take each .ps file from... (3 Replies)
Discussion started by: jasjot31
3 Replies

3. AIX

AIX converting PDF to PS

my app creates pdf and prints them on windows. I want to run the same app on AIX 5.2. I convert PDF to PS using acroread command. But some options of acroread like landscape etc do not work. I came to know from google that there is bug with acroread for AIX with landscape option. Can you suggest... (3 Replies)
Discussion started by: vinayakshukre
3 Replies

4. UNIX for Dummies Questions & Answers

Converting multiple latex files to pdf

Hi everybody! This is my first post. I am a student and I'm familiarizing myself with linux. I have lots of directories each containing file called "zadaci.latex". I want to convert them to pdf's and rename them to <directory_name>.pdf. I read alot on this forum and came up with this script:... (2 Replies)
Discussion started by: Element9
2 Replies

5. Shell Programming and Scripting

Converting html to pdf perl

Hi All, I have a requirement of converting an html form into pdf using perl. The html form contains images, tables and css implementation. I tried using various perl modules but failed to achive the target. I succeeded in generating a pdf from the html file using... (2 Replies)
Discussion started by: DILEEP410
2 Replies

6. UNIX for Dummies Questions & Answers

Converting EPS to JPG issue

I'm trying to convert a file with the following command: convert -verbose image.eps -resize 500x image.jpg The problem is that the output image loses it's quality and gets all blurred when resized. It shouldn't happen since I'm working with a vector. I'm pretty sure that I'm missing a... (0 Replies)
Discussion started by: rlopes
0 Replies

7. UNIX for Dummies Questions & Answers

Ghostscript error while converting PDF to Postscript

Hi, I have been using Ghostscript to convert PDF to Postscript (PS) file. GS version : 8.15.2. GS command used is : gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite -sOutputFile=output1.ps input1.pdf File format conversion to PS is success in majority of the cases but some PDF files are... (0 Replies)
Discussion started by: geeveejey
0 Replies

8. Shell Programming and Scripting

Create a dummy file in all directories that include a .jpg

Hello. My latest project has me with the need for the following script. Basically, any directory that includes a .jpg file needs to also have a ".picture" file created (if it doesn't exist). Here's an example of what I need. /mnt/user/Pictures/2011/Hawaii - 2011/.picture... (11 Replies)
Discussion started by: Davinator
11 Replies

9. Shell Programming and Scripting

Converting secured pdf files to pdf using acroread

Does anybody have idea of Converting secured pdf files to pdf using acroread ? ---------- Post updated at 04:49 PM ---------- Previous update was at 04:44 PM ---------- This file is not password protected. (4 Replies)
Discussion started by: Soham
4 Replies

10. Shell Programming and Scripting

Create pdf of a jpg image in shell script

Dear Team, Can any one please let me know, if there is any way to create pdf of a Jpg image file in shell script. I work on Solaris, Korn Shell. Currently we are using sunpcl2pdf.exe to create PDF from PCL(Printer Control Language) files. But we are searching for some different way to... (2 Replies)
Discussion started by: Uttam Maji
2 Replies
pdfseparate(1)						      General Commands Manual						    pdfseparate(1)

NAME
pdfseparate - Portable Document Format (PDF) page extractor SYNOPSIS
pdfseparate [options] PDF-file PDF-page-pattern DESCRIPTION
pdfseparate extract single pages from a Portable Document Format (PDF). pdfseparate reads the PDF file PDF-file, extracts one or more pages, and writes one PDF file for each page to PDF-page-pattern, PDF-page- pattern should contain %d. %d is replaced by the page number. The PDF-file should not be encrypted. OPTIONS
-f number Specifies the first page to extract. If -f is omitted, extraction starts with page 1. -l number Specifies the last page to extract. If -l is omitted, extraction ends with the last page. -v Print copyright and version information. -h Print usage information. (-help and --help are equivalent.) EXAMPLE
pdfseparate sample.pdf sample-%d.pdf extracts all pages from sample.pdf, if i.e. sample.pdf has 3 pages, it produces sample-1.pdf, sample-2.pdf, sample-3.pdf AUTHOR
The pdfseparate software and documentation are copyright 1996-2004 Glyph & Cog, LLC and copyright 2005-2011 The Poppler Developers - http://poppler.freedesktop.org SEE ALSO
pdfunite(1), 15 September 2011 pdfseparate(1)
All times are GMT -4. The time now is 02:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy