Sponsored Content
Full Discussion: Converting ps file to pdf
Top Forums Shell Programming and Scripting Converting ps file to pdf Post 302090719 by Yogesh Sawant on Wednesday 27th of September 2006 05:09:33 AM
Old 09-27-2006
Here's the simplest way to do so:

#!/bin/sh
for psfile in `ls -1 *ps`
do
ps2pdf $psfile
done
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

converting PDF to text, rtf doc format

Hi all Is there any program which can convert PDF to word processor file ? If the PDF has smart quotes, bullet icons, copyright and trademark symbols, etc. what happens to them intext format? So ideally would like to conver into rtf or doc. Thanks SS (1 Reply)
Discussion started by: saurya_s
1 Replies

2. UNIX for Advanced & Expert Users

Converting .ps file to .pdf file from where it is broken

In my folder Testing I have 5 files. 1.ps 2.ps 3.ps 4.ps 5.ps Now When I am converting this .ps file to .pdf file then it is broken at the 2.ps file. And I created one status.txt file where this broken file 2.ps is stored. Now How shell I start to convert .ps file to .pdf file from... (5 Replies)
Discussion started by: sunitachoudhury
5 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. UNIX for Dummies Questions & Answers

Converting LATEX PDF to WORD document

Hi there, is it possible to convert pdf files to Word with some free :p software or with some trick??? Now I'm working with LATEX and I can get pdf format but I would like to get .rtf or .doc files too:rolleyes:. Lately I found something like that, but it wasn't free. Thanks for any... (1 Reply)
Discussion started by: Giordano Bruno
1 Replies

6. 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

7. Shell Programming and Scripting

Script for converting a pdf to book format

Hello, excuse my English... I'm trying to do a nautilus-script to transform a normal A4 pdf to another pdf with book format, ready to be printed (double sided). I mean, the script put pages in order and also put 2 pages per horizontal A4 page (p.e.: a pdf with 8 pages would look like: 8-1, 2-7,... (2 Replies)
Discussion started by: dokan
2 Replies

8. 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

9. UNIX for Dummies Questions & Answers

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: for fname in *.pdf; do convert $fname ${fname%.pdf}.jpg; doneIt works great but the problem is I have to run this in terminal for each... (2 Replies)
Discussion started by: martinsmith
2 Replies

10. 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
pstopnm(1)                                                    General Commands Manual                                                   pstopnm(1)

NAME
pstopnm - convert a PostScript file into a portable anymap SYNOPSIS
pstopnm [-stdout] [-forceplain] [-help] [-llx s] [-lly s] [-landscape] [-portrait] [-nocrop] [-pbm |-pgm |-ppm] [-urx s] [-ury s] [-ver- bose] [-xborder n] [-xmax n] [-xsize f] [-yborder f] [-ymax n] [-ysize n] psfile[.ps] DESCRIPTION
Reads a PostScript file as input. Produces PBM, PGM, or PPM files as output. This program simply uses GhostScript to render a PostScript file with its PNM device drivers. If you don't have GhostScript installed (invoked by a gs command), or the version you have installed was not built with the relevant PNM device drivers, pstopnm will fail. You can see if you have the proper environment by issuing the command gs --help . If it responds and lists under "Available Devices" pbm, pbmraw, pgm, pgmraw, pnm, pnmraw, ppm, or ppmraw, you're in business. pstopnm does not use the Netpbm libraries to generate the output files, so may not be entirely consistent with most Netpbm programs. psfile[.ps] is the name of the input file. .pstopnm will add the ps to the end of the name you specify if no file exists by the exact name you specify, but one with added does. Use - to indicate Standard Input. If you use the -stdout option, pstopnm outputs images of all the pages as a multi-image file to Standard Output. Otherwise, pstopnm cre- ates one file for each page in the Postscript document. The files are named as follows: If the input file is named psfile.ps, the name of the files will be psfile001.ppm, psfile002.ppm, etc. The filetype suffix is .ppm, .pgm, or .pbm, depending on which kind of output you choose with your invocation options. If the input file name does not end in .ps, the whole file name is used in the output file name. For example, if the input file is named psfile.old, the output file name is psfile.old001.ppm, etc. Note that the output file selection is inconsistent with most Netpbm programs, because it does not default to Standard Output. This is for historical reasons, based on the fact that the Netpbm formats did not always provide for a sequence of images in a single file. Each output file contains the image of a rectangular part of the page to which it pertains. The selected area will always be centered in the output file, and may have borders around it. The image area to be extracted from the PostScript file and rendered into a portable anymap is defined by four numbers, the lower left corner and the upper right corner x and y coordinates. These coordinates are usually specified by the BoundingBox comment in the PostScript file header, but they can be overridden by the user by specifying one or more of the following options: -llx, -lly, -urx, and -ury. The presence and thickness of a border to be left around the image area is controlled by the use of the options -xborder and -yborder. If pstopnm does not find BoundingBox parameters in the input, and you don't specify image area coordinates on the command line, pstopnm uses default values. If your input is from Standard Input, pstopnm does not use the Bound- ingBox parameters (due to the technical difficulty of extracting that information and still feeding the file to Ghostscript), so you either have to specify the image area coordinates or take the default. Unless you specify both output file width and height, via the -xsize and -ysize options, pstopnm maps the document into the output image by preserving its aspect ratio. It has been reported that on some Postscript Version 1 input, Ghostscript, and therefore pstopnm, produces no output. To solve this prob- lem, you can convert the file to Postscript Version 3 with the program ps2ps. It is reported that the program pstops does not work. OPTIONS
-forceplain forces the output file to be in plain (text) format. Otherwise, it is in raw (binary) format. See pbm(1), etc. -llx bx selects bx as the lower left corner x coordinate (in inches). -lly by selects by as the lower left corner y coordinate (in inches). -landscape renders the image in landscape mode. -portrait renders the image in portrait mode. -nocrop does not crop the output image dimensions to match the PostScript image area dimensions. -pbm -pgm -ppm selects the format of the output file. By default, all files are rendered as portable pixmaps (ppm format). -stdout causes output to go to Standard Output instead of to regular files, one per page (see description of output files above). Use pnm- split to extract individual pages from Standard Output. -urx tx selects tx as the upper right corner x coordinate (in inches). -ury ty selects ty as the upper right corner y coordinate (in inches). -verbose prints processing information to stdout. -xborder frac specifies that the border width along the Y axis should be frac times the document width as specified by the bounding box comment in the PostScript file header. The default value is 0.1. -xmax xs specifies that the maximum output image width should have a size less or equal to xs pixels (default: 612). -xsize xsize specifies that the output image width must be exactly xs pixels. -yborder frac specifies that the border width along the X axis should be frac times the document width as specified by the bounding box comment in the PostScript file header. The default value is 0.1. -ymax ys specifies that the maximum output image height should have a size less or equal to ys pixels (default: 792). -ysize ys specifies that the output image height must be exactly ys pixels. BUGS
The program will produce incorrect results with PostScript files that initialize the current transformation matrix. In these cases, page translation and rotation will not have any effect. To render these files, probably the best bet is to use the following options: pstopnm -xborder 0 -yborder 0 -portrait -nocrop file.ps Additional options may be needed if the document is supposed to be rendered on a medium different from letter-size paper. SEE ALSO
gs(1), pstofits(1), pnmtops(1), psidtopgm(1), pbmtolps(1), pbmtoepsi(1), pnmsplit(1) COPYRIGHT
Copyright (c) 1992 Smithsonian Astrophysical Observatory PostScript is a Trademark of Adobe Systems Incorporated. AUTHOR
Alberto Accomazzi, WIPL, Center for Astrophysics. 28 June 2000 pstopnm(1)
All times are GMT -4. The time now is 09:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy