Operating System - HP-UX
1752866 Members
3674 Online
108791 Solutions
New Discussion юеВ

Re: convert text file to postscript file with psfontpf

 
CPost_1
New Member

convert text file to postscript file with psfontpf

We currently print text files on a Tru64 system after converting to postscript via lpspr. We are migrating to HPUX and attempting to convert text files using psfontpf. Having great difficulty matching the output of the Tru64 with lpspr utilizing psfontpf on HPUX. For instance the command to convert a text document to postscript file that has 117 characters per line and 66 lines per page using lpspr is "lpspr -Oportrait -w117 -z66 textfile > postscriptfile", lp the postscript file and you have a document with 117 characters per line and 66 lines per page and a 1/4 inch boarder on all sides. Have attempted to do this a number of ways via psfontpf, have not come close. Have tried "psfontpf -onb -opm=.125 -owidth=117 -olines=66 textfile > postscriptfile. Have also attempted using -ocpi -olpi options instead of -owidth & -olines. Have also tried -ohmi and -ovmi. Any ideas what combination of options might work?

Thanks,

Craig
8 REPLIES 8
Steven Schweda
Honored Contributor

Re: convert text file to postscript file with psfontpf

> [...] via lpspr.

What's "lpspr"? I don't see it in the Tru64
docs. If it's a loose piece of freeware,
then the source should exist somewhere. If
you have the source, then why not build and
use it on the HP-UX system?
OldSchool
Honored Contributor

Re: convert text file to postscript file with psfontpf

the docs for psfontpf seem to note that it should only be used from the printer driver??

My questions to you are:

What is teh desired output, a file containing postsccript, or the printed document?

Are you attempting some sort of reformatting (you mentioned line widths and page lengths?)
CPost_1
New Member

Re: convert text file to postscript file with psfontpf

Steve,

This is from the man page description for lpspr. It appears that it is a Digital Equipment application, do not believe source is available.

LPSPR(1) LPSPR(1)

NAME
lpspr - prepare files for printing on Digital PrintServer printers


DESCRIPTION
lpspr prepares one or more input files for special printing on the
PrintServer family of PostScript printers by Digital Equipment Corporation.
The formatted output is written to standard output, allowing for redirec-
tion to an output file (using standard shell redirection methods), or pip-
ing to another program, such as lp(1). That is, lpspr does not directly
queue the resulting output for printing on a spooled printer. ASCII data,
by default, will be automatically converted to PostScript in the output
stream.
CPost_1
New Member

Re: convert text file to postscript file with psfontpf

OldSchool,

We are currently in the process of migrating from Tru64 to HPUX, customers expect the documents and forms to look the same printed from the new HPUX environment as the did from the Tru64 environment.

For instance from Tru64 system we converted a text document to a postscript document via lpspr. This particular printed document is portrait orientation, 117 characters per lines, and 66 lines per page with 1/4 inch border on the sides, top and bottom. I am attempting to generate the same output from HPUX using psfontpf. Have other documents that are portrait, 110 characters per line, and 88 lines per page. Proper scaling has been the issue. Can get it to generate the 117 characters per line and 66 lines per page but it is not scaled properly on the page.
OldSchool
Honored Contributor

Re: convert text file to postscript file with psfontpf

assuming your using printers defined on the hpux box, and the printers are laserjet compatible, you might be able to use the various options of net_ljxx to print them directly.

I know that it will handle the number lines and the orientation. the number of characters per line might be problematic, but the options for character set / width / spacing are available.

"For instance from Tru64 system we converted a text document to a postscript document via lpspr."

That generally *not* required. The model the model script / print command will do the conversion.

"Can get it to generate the 117 characters per line and 66 lines per page but it is not scaled properly on the page."

Its been a while, but you should be able to play with the options for font size / pitch / horizontal spaceing to get it workable.

I would not expect an exact match, but you should be able to come fairly close.
CPost_1
New Member

Re: convert text file to postscript file with psfontpf

OldSchool,

Making some progress with options, as you mentioned getting close not perfect. Hopefully close will be good enough. Thanks for you assistance and time.

Regards,

Craig
Steven Schweda
Honored Contributor

Re: convert text file to postscript file with psfontpf

urtx# sizer -v
HP Tru64 UNIX V5.1B (Rev. 2650); Fri Mar 20 20:19:48 CDT 2009
urtx# man lpspr
No reference page found for lpspr.

> [...] Digital PrintServer printers

Perhaps the program came with a printer. It
seems not to come with the OS. (At least
nowadays.)

It might be possible (although unpleasant) to
look at the actual PostScript produced by the
two programs. Perhaps some critical
difference in some parameter or other (font
size, spacing, who-knows?) would leap right
out at you. Seems unlikely, but it might not
take very long to get discouraged, and you
could get lucky.
CPost_1
New Member

Re: convert text file to postscript file with psfontpf

Steven,

Have done some comparing of the postscript files that both generate. There are some major differences. But it does help in identifying the font used, size. lpspr works with PS-Adobe-1.0 while psfontpf utilizes PS-Adobe-2.0 & 3.0 according to the man page, ours happens to be using PS-Adobe-3.0. Thanks for your time and effort.

Regards,

Craig