/* This genie uses the public domain Postscript interpreter "Post" to print your document. The advantages are that you can print .eps files on a non-Postscript printer and that you can use real Type 1 fonts, rather than converted versions. The files "post" and "init.ps" should be in a drawer called "post" in your "PPage:" drawer (if not, modify the indicated line in the genie), the necessary .psfont files in CGFonts:ps, and "post.library" in libs: You do NOT need "Conman".
Make sure the assigns for PPage: and CGFonts: are set up in your startup-sequence or user-startup files.
It is also essential to set the Limits in your printer graphics preferences to the correct page size in pixels i.e. the printer's dots-per-inch * page size in inches. Typical figures are 1500 by 2100. */
/* Written by Don Cox. Not Public Domain. All rights reserved. */
trace n
signal on error
signal on syntax
address command
call SafeEndEdit.rexx()
call ppm_AutoUpdate(0)
cr="0a"x
oldoutput = ppm_GetPSOutput()
call ppm_SetPSOutput("PPage:temp.ps")
call ppm_SetPSFontDownload(0)
success = ppm_PrintDocPS(1,1)
if success ~=1 then exit_msg("Failed saving temporary Postscript file.")
form = "Page size (0-7):3"cr"Portr./landsc. (P/L):P"cr"Start page:all"cr"End page:all"cr"Number of copies:1"cr"Compress on/off(1/0):1"cr"Destination:par"
form = ppm_GetForm("Printing setup...",7,form)
if form = "" then exit_msg("Aborted by user")
parse var form size "0a"x portrait "0a"x startpage "0a"x endpage "0a"x copies "0a"x compression "0a"x destination
size = left(size,1)
if verify(size,"01234567")~=0 then size = 3
portrait = upper(left(portrait,1))
if portrait = "L" then portrait = 1
else portrait = 0
if datatype(startpage,"N")=0 then startpage = 0
if datatype(endpage,"N")=0 then endpage = 0
if datatype(copies,"N")=0 then copies = 1
if left(compression,1)~="0" then compression = 1
destination = strip(destination,"T",":")
if destination~="par" & destination~="ser" then do