Pre-press

karl at aspodata.se karl at aspodata.se
Fri Sep 23 20:05:54 CEST 2022


Zdeněk Wagner:
> čt 22. 9. 2022 v 17:17 odesílatel <karl at aspodata.se> napsal:
...
> > Isn't it possible to do pre-press with PostScript ?
> Generally, PDF/X is required but anyway, do you know a tool which can
> check the font size, font embedding, line width, color space,
> resolution of bitmap images, black overprint and optionally convert
> the color spaces using ICC profiles in postscript?

Ok, regarding line width I can go the route as outlined below which
is clearly batch oriented.

I sure I can do the same for font size and probably the other
things also if and when I can understand the terminology you use.

Since postscript is a programming language, I can add another
level of indirection, e.g.:

$ cat debug.ps
/str 20 string def

/numprint {
    count 0 gt { str cvs print } if
} bind def

/xyprint {
    numprint ( ) print numprint
} bind def

/deb_move   { (moveto    ) print xyprint () = } bind def
/deb_line   { (lineto    ) print xyprint () = } bind def
/deb_curve  { (curveto   ) print xyprint ( ) print xyprint  ( ) print xyprint () = } bind def
/deb_close  { (closepath ) print xyprint () = } bind def
/deb_path { { deb_move } { deb_line } { deb_curve } { deb_close } pathforall } bind def

/old_setlinewidth /setlinewidth load def
/setlinewidth {
    (setlinewidth ) print
    dup =
    old_setlinewidth
} bind def

/old_stroke /stroke load def
/stroke {
    deb_path
    ( stroke) =
    old_stroke
} bind def

/old_showpage /showpage load def
/showpage {
    ( showpage) =
    showpage
} bind def
$ (cat debug.ps git/openhw/boards_other/adapters/so_dil16.ps; echo quit) > tst.ps
$ gs -q -dNODISPLAY tst.ps | head
 showpage
setlinewidth 0
moveto    0.678168 1.27157
lineto    500001.0 1.27157
lineto    500001.0 600001.0
lineto    0.678168 600001.0
closepath  
 stroke
setlinewidth 0
moveto    -0.678168 199999.0
$ gs -q -dNODISPLAY tst.ps | grep -c showpage 
11
$ gs -q -dNODISPLAY tst.ps | grep setlinewidth | sort | uniq -c
     55 setlinewidth 0
    200 setlinewidth 0.4
    117 setlinewidth 1000
      5 setlinewidth 1500
    118 setlinewidth 2000
      2 setlinewidth 3000
      2 setlinewidth 600
      1 setlinewidth 800
$

Regards,
/Karl Hammar



More information about the tex-live mailing list.