5 out("%%%%Page: %d %d\n", n
, n
);
6 out("/saveobj save def\n");
8 out("%d pagesetup\n", n
);
11 void ps_pageend(int n
)
15 out("saveobj restore\n");
16 out("%%%%EndPage: %d %d\n", n
, n
);
19 void ps_trailer(int pages
, char *fonts
)
23 out("%%%%DocumentFonts: %s\n", fonts
);
24 out("%%%%Pages: %d\n", pages
);
29 "/resolution 720 def\n"
30 "/pagesize [612 792] def\n"
31 "/inch {72 mul} bind def\n"
34 " counttomark 2 idiv {def} repeat pop\n"
35 " /scaling 72 resolution div def\n"
36 " linewidth setlinewidth\n"
38 " 0 pagesize 1 get translate\n"
39 " scaling scaling scale\n"
45 " currentdict /pagedict known currentdict page known and {\n"
46 " page load pagedict exch get cvx exec\n"
50 "/w {neg moveto show} bind def\n"
51 "/m {neg moveto} bind def\n"
52 "/g {neg moveto {glyphshow} forall} bind def\n"
53 "/rgb {255 div 3 1 roll 255 div 3 1 roll 255 div 3 1 roll setrgbcolor} bind def\n"
54 "/done {/lastpage where {pop lastpage} if} def\n"
57 " dup /font exch def findfont exch\n"
58 " dup /ptsize exch def scaling div dup /size exch def scalefont setfont\n"
59 " linewidth ptsize mul scaling 10 mul div setlinewidth\n"
62 "/savedmatrix matrix def\n"
67 " savedmatrix currentmatrix pop scale\n"
68 " .5 0 rmoveto currentpoint .5 0 rmoveto .5 0 360 arc\n"
69 " savedmatrix setmatrix\n"
76 " currentpoint dy1 neg add exch dx1 add exch\n"
77 " dx1 dx1 mul dy1 dy1 mul add sqrt\n"
89 " x0 5 x1 mul add 6 div\n"
90 " y0 5 y1 mul add -6 div\n"
91 " x2 5 x1 mul add 6 div\n"
92 " y2 5 y1 mul add -6 div\n"
100 out("%%!PS-Adobe-2.0\n");
101 out("%%%%Version: 1.0\n");
102 out("%%%%Creator: neatroff - http://litcave.rudi.ir/\n");
103 out("%%%%DocumentFonts: (atend)\n");
104 out("%%%%Pages: (atend)\n");
105 out("%%%%EndComments\n");
107 out("%%%%BeginProlog\n");
109 out("%%%%EndProlog\n");
110 out("%%%%BeginSetup\n");
111 out("<< /PageSize pagesize /ImagingBBox null >> setpagedevice\n");
114 out("%%%%EndSetup\n");