×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Total newbie needing help here!

Total newbie needing help here!

Total newbie needing help here!

(OP)
Hi! I'm totally new to PostScript. I want to use it to generate a report from Access and then convert it to PDF using GhostScript. I don't want to use any virtual printer (whether it's to generate a PS or PDF file). I would just need a few guidelines to know how to set a page's size, position text on a page (I don't really understand how 'moveto' works) and stuff like that. Any help would be much appreciated!

RE: Total newbie needing help here!

PostScript is an unusual, but fun, language.

First, the coordinate system. It uses an x and y axis, with the origin (0,0) at the lower left corner of the page.

It uses "points", and there are 72 points per inch. Thus an 8.5x11 inch "letter sized" page is 612 x 792 points.

Page size:

CODE

<</PageSize [612 792]>> setpagedevice

To draw text:

1. assign a font
2. define a current point (spot to start drawing)
3. draw a string

Complete program:

CODE

%!PS
<< /PageSize [612 792] >> setpagedevice
/Courier 14 selectfont
10 600 moveto
(Hello world!) show
showpage

"moveto" requires two numbers on the stack, an x and a y. "show" requires a string, which PostScript delineates with parantheses.

Experiment with that, and come back if you have any more questions.

Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting

RE: Total newbie needing help here!

(OP)
Thanks a lot, mate! That's exactly what I was looking for! You wouldn't know any websites with small (but good) examples that I could use, would you? Thanks again! It's people like you who make this website so great!

RE: Total newbie needing help here!

Would I be permitted to mention my own site, in direct response to your question? It has several articles on the PostScript language.

See if you can find the "PostScript Tutorial and Cookbook" online somewhere, also known as the "The PostScript Blue Book". It has lots of little sample programs and quick tutorials.

Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting

RE: Total newbie needing help here!

(OP)
Thanks a lot!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close