Creating a PostScript File


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Creating a PostScript File
# 1  
Old 03-02-2012
Error Creating a PostScript File

Hi All,
I have a requirement, where i have create a pdf file in unix. I have gone through few links and understood that it could be done in 2 step manner.
- Create a .ps PostScript file.
- Pass .ps file to p2pdf command to create the pdf.

But i am having trouble creating the .ps file. I have learned that a2ps is the command to create it.
But in my setup, the shell does nt recognize the a2ps command, but it does have a man page.
Not sure what i am missing here, can someone please let me know what the problem is?

Also is there a better way to create a pdf file in unix.

Thank you in advance,

Regards,
Abhishek S.
# 2  
Old 03-02-2012
a2ps is not "the" postscript command, just a postscript command.

Postscript is just text, with carriage-return newline. You can write it by hand if you really want to. (from math-696)

Code:
cat <<EOF | sed 's/$/\r/' > myfile.ps
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 135 110
/Helvetica findfont 60 scalefont setfont
/print696 {0 0 moveto (696) show} def
.90 -.03 .10 
{dup 1 exch sub 0 setrgbcolor print696
            2 .5 translate 1 rotate  } for
0 0 1.0 setrgbcolor print696
showpage
EOF

Our office printer was willing to print it, it shows '696' in rotated text in one corner, so it's valid postscript...
# 3  
Old 03-08-2012
Generate pdf in unix

Hi Corona,
Thanks for the prompt response, but the requirement here i have to convert the any file into .pdf file in unix.

Am not sure, how effective it is generate the pdf with the post script file.
I ll def try out the solution, but is there any better way that we could generate pdf in unix. ?
# 4  
Old 03-08-2012
If you don't have a2ps, you could try installing it.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to print postscript files?

Hi, I am looking for a quick answer. How to print postscript files by using gs command? Let's say the HP printer's hostname is pname and the document name is pfile. The OS is RHEL 4 with cups enabled. I've read gs man but didn't get it well. Thank you in advance! (1 Reply)
Discussion started by: aixlover
1 Replies

2. AIX

Printing Postscript files through Infoprint Manager to a Postscript printer

Hello, I am runnning Infoprint Manager 4.3 on AIX 5.2 . There is no problem printing AFP files, but I have hit a snag trying to use "AIX DSS" or "Other Printer" actual destinations to send unconverted Postscript files to native Postscript printers. The files are big, and they print correctly,... (0 Replies)
Discussion started by: ahetzel
0 Replies

3. UNIX for Dummies Questions & Answers

Splitting a postscript file

Hi , I have a problem .. I have a post script file which has text as %%colur code :uyiu %% pagesize :9808 %%page: 1 1 %%color:78798- %%ufgfhre %%Page: 2 1 I need to create two files with this one post script file . the first file should have data till what is in %%Page: 1 1 ... (4 Replies)
Discussion started by: selvapraveen
4 Replies

4. Shell Programming and Scripting

change text color in postscript file

Hi everyone, I have a program that produces postscript files on the fly The color of the files produced are in black and white I want to change the text color of postscript file as the file is being produced without having to manually go into the ps file and change it myself. Any Ideas?... (5 Replies)
Discussion started by: walforum
5 Replies

5. Shell Programming and Scripting

setpagedevice (postscript)

Basically, I'd like to apply a printer tray selection on postscript files by means of a (Bash) shell script. What works on a Xerox DocuColor 5000, is this (exemplified for one tray): sed "s/BeginPageSetup/&\n<<\/MediaColor (red)>> setpagedevice/" -i page.ps Every attempt to do so on a... (0 Replies)
Discussion started by: dr.house
0 Replies

6. UNIX for Dummies Questions & Answers

"convert" chops off part of postscript file?

I have images in PS that I want to convert to JPG (unfortunately, I need to use them in Powerpoint! :eek:). The problem is that the edges of the image get chopped off when I use: convert filename.ps filename.jpg So, for example, in my plots, the top and bottom labels for the x-axis are... (0 Replies)
Discussion started by: ramparts
0 Replies

7. Solaris

COnversion utility xhtml file to Postscript file

Hi, Can any suggest me some utility to convert xhtml file to postscript file format? Also tell me from where to down load such utility.. With Regards, Dattatray (0 Replies)
Discussion started by: dattatray.b
0 Replies

8. UNIX for Dummies Questions & Answers

Printing Chinese postscript file

G'day, I've a Solaris 9 box & I've configured a HP Laserjet for postscript printing. When my client prints an English postscript file, it gets printed fine. But when he sends a Chinese postscript file, there is no output at the printer. Is there anything I need to set for Chinese... (0 Replies)
Discussion started by: Albert J.
0 Replies

9. UNIX for Dummies Questions & Answers

UNIX and PostScript

Hi! Iīm wondering if itīs possible to use PostScript in UNIX. I have a client that want to install a HP ColorPro GA in a UNIX network and I donīt have any experience about UNIX. Is UNIX using PostScrip by deafault, like a Mac or does he need to install some form of RIP? Best regards <Therapy> (2 Replies)
Discussion started by: <Therapy>
2 Replies

10. UNIX for Dummies Questions & Answers

postscript printing

How do I setup a printer queue to do postscript printing using UNIX commands? I setup a remote host/printer using the admintool (solaris), but it does not let me specify that this printer will print postscript. (1 Reply)
Discussion started by: pkappaz
1 Replies
Login or Register to Ask a Question