plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

pdfprolog.c (572B)


      1 "/Page null def\n"
      2 "/Page# 0 def\n"
      3 "/PDFSave null def\n"
      4 "/DSCPageCount 0 def\n"
      5 "/DoPDFPage {dup /Page# exch store pdfgetpage pdfshowpage } def\n"
      6 "\n"
      7 "/pdfshowpage_mysetpage {	% <pagedict> pdfshowpage_mysetpage <pagedict>\n"
      8 "  dup /CropBox pget {\n"
      9 "      boxrect\n"
     10 "      2 array astore /PageSize exch 4 2 roll\n"
     11 "      4 index /Rotate pget {\n"
     12 "        dup 0 lt {360 add} if 90 idiv {exch neg} repeat\n"
     13 "      } if\n"
     14 "      exch neg exch 2 array astore /PageOffset exch\n"
     15 "      << 5 1 roll >> setpagedevice\n"
     16 "  } if\n"
     17 "} bind def\n"
     18 "\n"
     19 "runpdfbegin\n"