🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.postscript.programming
7 messages
7 total messages Started by David_Blakes Tue, 14 Oct 2003 03:35
Unigraphics PostScript Files Distill Blank Images
#898
Author: David_Blakes
Date: Tue, 14 Oct 2003 03:35
6 lines
1365 bytes
I'm completely unfamiliar with Unigraphics and HPUX 11.x. However I think I should be able to deal with postscript files correctly. Our new plotter will not print from Unigraphics postscript files. It will however print from that application in HPGL or CalComps formats. I have taken the PS files from my customer, which using Ghostscript, Distiller, or even Photoshop, I get nothing but white paper. The plotter deals with any PDF and my PS files just fine, making me believe there is something not right with their files. The following was the lead two lines in the PS header of any file sample.

%!PS-Adobe-2.0
%%Creator: UGIIPS

I think it is PS Level 2, but that doesn't make any sense why that should matter. Any ideas?
Re: Unigraphics PostScript Files Distill Blank Images
#899
Author: Aandi_Inston
Date: Tue, 14 Oct 2003 08:45
5 lines
943 bytes
That doesn't mean PS level 2.   (It means version 2 of the DSC
comments, but should make no difference).  That doesn't solve your
problem, I know, but there's not much information in those two lines.

Aandi Inston
Re: Unigraphics PostScript Files Distill Blank Images
#900
Author: David_Blakes
Date: Tue, 14 Oct 2003 13:15
42 lines
2574 bytes
Thanks Aandi for your quick reply. Ok, I don't think it is appropriate to put the entire file here. But this is a larger portion of the header, until it just becomes numbers. I then included the tail end of the file. It doesn't resemble any other PS file I've looked at.

%!PS-Adobe-2.0
%%Creator: UGIIPS
%%EndCommments
gsave
25 dict begin
/A {4 index 4 index 5 2 roll gsave newpath arc stroke grestore} bind def
/F {findfont exch scalefont setfont} bind def
/WL {show} bind def
/WC {dup stringwidth 2 div neg exch 2 div neg exch rmoveto show} bind def
/WR {dup stringwidth neg exch neg exch rmoveto show} bind def
/S {2 copy stroke moveto} bind def
/U {exch 4 -1 roll add 3 1 roll add 2 copy moveto} bind def
/D {exch 4 -1 roll add 3 1 roll add 2 copy lineto} bind def
/u {2 copy 6 -2 roll pop pop moveto} bind def
/d {2 copy 6 -2 roll pop pop lineto} bind def
/letter {statusdict/lettertray known {statusdict begin lettertray end} if} bind def
/ledger {statusdict/11x17tray known {statusdict begin 11x17tray end} if} bind def
/legal {statusdict/legaltray known {statusdict begin legaltray end} if} bind def
/a4 {statusdict/a4tray known {statusdict begin a4tray end} if} bind def
/a3 {statusdict/a3tray known {statusdict begin a3tray end} if} bind def
%%EndProlog
  /penwidths 0.0
                0.0100 0.0170 0.0030
                0.0070 0.0130 0.0200
                0.0230 0.0260 0.0300
                0.0330 0.0360 0.0390
                0.0590 0.0690 0.0790
  16 array astore def
  /P {
        0.0 0.0 0.0 setrgbcolor
        penwidths exch get 1440 mul setlinewidth
  } bind def
letter
1 setlinecap
2 setlinejoin
.05 .05 scale
0.0 0.0 moveto 0.0 0.0
1 P 3 P 2 P 3 P 23337.00 -11488.00 U 0.00 -139.00 D 0.00 70.00 U 77.00 0.00 D -77...................
...................................270.00 630.00 A -10870.00 9060.00 U stroke showpage
grestore
Re: Unigraphics PostScript Files Distill Blank Images
#901
Author: Aandi_Inston
Date: Wed, 15 Oct 2003 07:35
13 lines
1375 bytes
Looks normal enough to me - PostScript is a programming language and
anything goes, pretty much.

I think you have two choices:
- contact the support people for the Unigraphics program, who should
be making files that work. Test it with GhostScript on HP/UX to give a
test they should be absolutely familiar with - most Unix PostScript
probably goes to GhostScript.
- find (or become) a PostScript expert to read the file, line by line,
examining the program for why it is blank (often much harder than
finding an error).

Aandi Inston
Re: Unigraphics PostScript Files Distill Blank Images
#903
Author: SaGS
Date: Wed, 15 Oct 2003 08:42
4 lines
1322 bytes
I think the problem is with the coordinates falling below the bottom of the
page and at right of its right margin, at leat that's the problem with the
fragment you posted. Add a "-612 792 translate" before the "0.05 0.05 scale"
and something will show up (not necesarily what is intended to be shown).
Re: Unigraphics PostScript Files Distill Blank Images
#902
Author: Jeroen_Dekker
Date: Wed, 15 Oct 2003 08:47
13 lines
1680 bytes
David,

If the HPGL output from UG does plot, why not just use that?

My company makes PostScript conversion software, and we have a number of customers who use it for PS files generated from UniGraphics. I can't speak for your plotter, but our software generally handles them without problems. Chances are it's plain Level 1 PostScript by the way, as most technical applications on UNIX output that.

If the problem persists and you need a solution, you could consider trying our ps2vector module (available on HP-UX) to batch convert the UG PS files automatically to HPGL (or to 'our' Level 1 PostScript output) for rendering by your plotter. You're welcome to send me a sample UG PS file for us to have a look at and convert as a test.

Jeroen Dekker
--
Square One - The Graphics Connection
Visit <http://www.square1.nl/index.htm>
jeroen@square1.nl
Re: Unigraphics PostScript Files Distill Blank Images
#705
Author: Miklos_Somogyi
Date: Thu, 16 Oct 2003 00:34
15 lines
1507 bytes
Usually you don't get a print if you use white ink on white paper
or your drawing is outside the page or a clipping rectangle.
Both are easy to find out.

In case of "outside drawing":

- set the scales to millimetres at the beginning of the file and save the ctm (use gsave/grestore not to spoil your scales)

- re-define the processes that use moveto and lineto so that they
calculate the x y coords in millimetres, then define/update
x_min y_min x_max y_max with them (using transform, itransform and your saved ctm)

- at the end set the scales to millimeteres, convert x_min etc to strings, and plot them where they are surely visible.

Miklos
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads