Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-02-2012
Registered User
 
Join Date: Nov 2010
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #2  
Old 03-02-2012
Mead Rotor
 
Join Date: Aug 2005
Location: Saskatchewan
Posts: 16,374
Thanks: 491
Thanked 2,535 Times in 2,418 Posts
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...
Sponsored Links
    #3  
Old 03-08-2012
Registered User
 
Join Date: Nov 2010
Posts: 20
Thanks: 4
Thanked 0 Times in 0 Posts
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
Mead Rotor
 
Join Date: Aug 2005
Location: Saskatchewan
Posts: 16,374
Thanks: 491
Thanked 2,535 Times in 2,418 Posts
If you don't have a2ps, you could try installing it.
Sponsored Links
Closed Thread

Tags
a2pf, pdf, pdf in unix

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Splitting a postscript file selvapraveen UNIX for Dummies Questions & Answers 4 08-26-2011 09:04 AM
change text color in postscript file walforum Shell Programming and Scripting 5 08-18-2011 01:24 PM
"convert" chops off part of postscript file? ramparts UNIX for Dummies Questions & Answers 0 08-14-2009 03:32 PM
COnversion utility xhtml file to Postscript file dattatray.b Solaris 0 08-25-2005 06:36 AM
Printing Chinese postscript file Albert J. UNIX for Dummies Questions & Answers 0 05-19-2005 11:33 PM



All times are GMT -4. The time now is 03:00 PM.