Ghostscript output file numbering?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Ghostscript output file numbering?
# 1  
Old 03-15-2010
Ghostscript output file numbering?

I am using ghostscript to convert a multi-page pdf file to individual jpg files. I am wondering if there is a way to get ghostscript to start numbering the output jpg files from zero? What i am trying to convey is that it starts naming my files from page_001.jpg, page_002.jpg, etc., and would like it to start at page_000.jpg

The command i am using is:
Code:
gs -dSAFER -dBATCH -dNOPAUSE -dUseCropBox -sDEVICE=jpeg -r300 -s.5 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dMaxStripSize=8192 -sOutputFile=page_%03d.jpg somefile.pdf

Or am i going to have to rename all the files myself after it is done processing the pdf into jpg files?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk use sequential line numbering in output

The awk below produces an output with the original header and only the matching lines (which is good), but the output where the original line numbering in the match found on is used. I can not figure out how to sequentially number the output instead of using the original. I did try to add... (2 Replies)
Discussion started by: cmccabe
2 Replies

2. Shell Programming and Scripting

awk changing numbering in output file

The below awk is supposed filter $8 of example.txt using the each line in gene.txt. I think it is but why is it renumbering the 1,2,3 in $1 to 28,29,394? I have attached the data as it is large, example.txt is the file to be searched, gene.txt has the lines to match, and filtered.txt is the current... (2 Replies)
Discussion started by: cmccabe
2 Replies

3. UNIX for Dummies Questions & Answers

numbering lines in a file

if we execute :set nu in vi mode, it displays the line numbers. so how to make this permanently in a file. Whenever i execute cat , the line numbers should be there. please help me. thanks (4 Replies)
Discussion started by: pandeesh
4 Replies

4. Shell Programming and Scripting

Numbering file's lines

hey a file called test : Code: hey1 hey2 hey3 ........ how to : Code: 1.hey1 2.hey2 3.hey3 .......... (3 Replies)
Discussion started by: eawedat
3 Replies

5. Shell Programming and Scripting

help with numbering a file

Hi, All I need to do is number a file. The file looks like this > JJJJJJJJJJJJJJJJJJJJJ > JKJKJKKKKKKJJJ > MMMMYKKKJKKK what I want to do is number it so that theres a numerical value beside the >. >1 JJJJJJJJJJJJJJJJJJJJJ >2 JKJKJKKKKKKJJJ (2 Replies)
Discussion started by: kylle345
2 Replies

6. Shell Programming and Scripting

numbering each line in a text file

I have a simple text file. I want to number each line in that file . for example: My text file is unix my file test My output should be 1 unix 2 my file 3 test (5 Replies)
Discussion started by: pitagi
5 Replies

7. UNIX for Dummies Questions & Answers

Create a PCL DUPLEX File using ghostscript-8.62

table.ubbfoot {background-color="#9999ff"} td.ubbfoot1 {font-size=8pt; font-family=arial,helvietica,swiss; color="#000000";} td.ubbfoot2 {font-size=8pt; font-family=arial,helvietica,swiss; color="#ffffff";} hello, i want to create PCL Duplex Output (to print) from a pdf File. i uses itanium (64)... (0 Replies)
Discussion started by: chzi
0 Replies

8. Shell Programming and Scripting

Numbering a Text File

Running into a little problem with blank lines. My file is of this format: To number each line of the file i would use: n=1 echo "$FILE" | while read line do echo "$n) $line" n=`expr $n + 1` But really, i dont want to number the blank lines. What i've tried is to use sed... (13 Replies)
Discussion started by: omgsomuchppl
13 Replies

9. Windows & DOS: Issues & Discussions

Numbering lines in a file

Hi all, I need to number the lines in a file. I tried using "set nu" in the vi editor, but it is only temporary. Can anyone help me please. Thanx in advance. MK (1 Reply)
Discussion started by: minazk
1 Replies

10. Shell Programming and Scripting

Numbering lines in a file

Hi all, I need to number the lines in a file. I tried using "set nu" in the vi editor, but it is only temporary. Can anyone help me please. Thanx in advance. MK (4 Replies)
Discussion started by: minazk
4 Replies
Login or Register to Ask a Question
PS2PDF(1)							    Ghostscript 							 PS2PDF(1)

NAME
ps2pdf - Convert PostScript to PDF using ghostscript ps2pdf12 - Convert PostScript to PDF 1.2 (Acrobat 3-and-later compatible) using ghostscript ps2pdf13 - Convert PostScript to PDF 1.3 (Acrobat 4-and-later compatible) using ghostscript SYNOPSIS
ps2pdf [options...] (input.[e]ps|-) [output.pdf|-] ps2pdf12 [options...] (input.[e]ps|-) [output.pdf|-] ps2pdf13 [options...] (input.[e]ps|-) [output.pdf|-] DESCRIPTION
The ps2pdf scripts are work-alikes for nearly all the functionality (but not the user interface) of Adobe's Acrobat(TM) Distiller(TM) prod- uct: they convert PostScript files to Portable Document Format (PDF) files. The three scripts differ as follows: - ps2pdf12 will always produce PDF 1.2 output (Acrobat 3-and-later compatible). - ps2pdf13 will always produce PDF 1.3 output (Acrobat 4-and-later compatible). - ps2pdf per se currently produces PDF 1.2 output (Acrobat 3-and-later compatible). However, this may change in the future. If you care about the compatibility level of the output, use ps2pdf12 or ps2pdf13, or use the -dCompatibility=1.x switch in the command line. There are some limitations in ps2pdf's conversion. See the HTML documentation for more information. SEE ALSO
gs(1), ps2pdfwr(1), Ps2pdf.htm in the Ghostscript documentation VERSION
This document was last revised for Ghostscript version 7.05. AUTHOR
L. Peter Deutsch <ghost@aladdin.com> is the principal author of Ghostscript. Russell J. Lang <rjl@aladdin.com> is the author of most of the MS Windows code in Ghostscript. This manpage by George Ferguson. 7.05 22 April 2002 PS2PDF(1)