• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Postscript Show Text on different lines

Community Beginner ,
Feb 29, 2008 Feb 29, 2008

Copy link to clipboard

Copied

Hi,

I am a postscript newbie and I hope that this is not a stupid question . I hope this is a right forum. I am trying to wrap text on different lines. For example, if I have a text

"Karthik Krishnan \n 847 N 700 E , \n Logan, UT 84321\n", I would like it to appear on different lines. It keeps appearing on the same line. This is a syntax that I have

/Arial findfont 10 scalefont setfont
10 70 moveto ("Karthik Krishnan \n 847 N 700 E , \n Logan, UT 84321\n") show

always returns the text on the same line. Please help me.
TOPICS
Programming

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 01, 2008 Mar 01, 2008

Copy link to clipboard

Copied

There is absolutely no feature in PostScript that works the way you
want it. You cannot put line breaks into strings. You must set each
string separately.

Aandi Inston

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 01, 2008 Mar 01, 2008

Copy link to clipboard

Copied

How do I set out each string separately? Can I search for \n characters for the same

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 02, 2008 Mar 02, 2008

Copy link to clipboard

Copied

You use a moveto before each string, each time changing the vertical
start position to where you decide a new line belongs.

It's possible to use the search operator in PostScript to split up
strings, but this is hard work and rarely done: such calculations
belong in the PostScript generator.

Aandi Inston

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2008 Mar 26, 2008

Copy link to clipboard

Copied

LATEST
You can take a look at Program 12 / A Simple Line Breaking Algorithm, page 181 in the blue book: PostScript Language Tutorial & Cookbook. It may or may not help you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines