Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Converting pdf to jpg in multiple directories? Post 302755525 by martinsmith on Sunday 13th of January 2013 03:03:06 PM
Old 01-13-2013
Quote:
Originally Posted by pen
Hi,


EDIT: Umm, I just noticed you want the change the filename extention for good - my solution leaves file names as foo.jpg.pdf... With find, this would work:
Code:
find root_of_pdfs -name \*.pdf | while read fname; do convert $fname ${fname%.pdf}.jpg; done

Hi Pen,

Yes Thanks you this is exactly what I needed! Smilie
It's worked perfectly after testing and done the conversion of all the pdf files to jpg.

Thanks very much for your help, I appreciate it!

Bets Regards
Martin
 

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
pstopdf(1)						    BSD General Commands Manual 						pstopdf(1)

NAME
pstopdf -- convert PostScript input into a PDF document. SYNOPSIS
pstopdf [inputfile] [-o outname] [-l] [-p] [-i] DESCRIPTION
pstopdf is a tool to convert PostScript input data into a PDF document. The input data may come from a file or may be read from stdin. The PDF document is always written to a file. The name of the output PDF file is derived from the name of the input file or may be explicitly named using the -o option. Flags: -o outname The name of the output file to create. If an explicit file name is not supplied, the output file will be created in the current directory and named foo.pdf for an input file named foo.ps -i Reads from stdin rather than a named input file. If the output file is not explicitly named and the input data comes from stdin the named output file will be stdin.pdf -l Specifies that any messages generated during file conversion be written to a log file. For an output file named foo.pdf the generated log file is foo.pdf.log rather than generated to stdout. If there are no messages, the log file is not generated. -p Generates a simple progress message to stdout at the end of each page. Because conversion of complex or lengthy PostScript input can take time, it is sometimes useful to see that progress is being made. Progress messages are always written to stdout even when the -l (log file) option is specified. EXAMPLES
pstopdf inputfile.ps Creates a PDF file named inputfile.pdf from the PostScript data in the input file inputfile.ps pstopdf -i -o outputfilename Creates a PDF file named outputfilename from the PostScript data read from stdin. Apple Computer, Inc. June 2, 2019 Apple Computer, Inc.
All times are GMT -4. The time now is 11:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy