aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/page/pdfprolog.ps
blob: 681e0587a709e20412700a85bd7378e79d161536 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/Page null def
/Page# 0 def
/PDFSave null def
/DSCPageCount 0 def
/DoPDFPage {dup /Page# exch store pdfgetpage pdfshowpage } def

/pdfshowpage_mysetpage {	% <pagedict> pdfshowpage_mysetpage <pagedict>
  dup /CropBox pget {
      boxrect
      2 array astore /PageSize exch 4 2 roll
      4 index /Rotate pget {
        dup 0 lt {360 add} if 90 idiv {exch neg} repeat
      } if
      exch neg exch 2 array astore /PageOffset exch
      << 5 1 roll >> setpagedevice
  } if
} bind def

GS_PDF_ProcSet begin
pdfdict begin