2 # fixdlsrps: fix DviLaser/PS document to work with PSUtils
4 # Copyright (C) Angus J. C. Duggan 1991-1995
5 # See file LICENSE for details.
19 $infont-- if /PXL.*RP/ || /DN?F.*RP/;
22 $infont-- if /PXL.*RP/ || /DN?F.*RP/;
23 } elsif ((/^%%EndSetup/ || /^%%Page:/) && $header) {
25 @body = ("%%EndSetup\n");
27 } elsif (/^%%EndProlog/ && !$nesting) {
29 "\$DviLaser begin/GlobalMode{}bdef/LocalMode{}bdef/XP{}def/RP{}def",
30 "/DoInitialScaling{72.0 Resolution div dup scale}bdef end\n", $_);
31 } elsif (/^%%BeginPageSetup/ && !$nesting) {
32 push(@body, "%%Page: $page $page\n", $_,
33 "Resolution 72 div dup scale Magnification 1000 div dup scale\n",
34 "/DocumentInitState where {\n",
35 "/DocumentInitState [ matrix currentmatrix currentlinewidth",
36 " currentlinecap currentlinejoin currentdash currentgray",
37 " currentmiterlimit] cvx put}if\n");
39 } elsif (/^%%BeginDocument:/ || /^%%BeginBinary:/ || /^%%BeginFile:/) {
42 } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) {
45 } elsif (!/^%%PageBoundingBox:/ && !/^%%Page:/) {