/* This genie uses the public domain Postscript interpreter "Post" to save your work as a set of numbered ILBM files in HiRes, 8 colours. You will be asked for the name of the first file (the numbers are added automatically). 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. The page size should be set to 6.4 by 5.12 inches for 640x512 (PAL), 6.4 by 4.0 for 640x400 (NTSC): the size in inches is 1/100 the size in pixels. */
/* Note: There is a bug in Post which means that it may refuse to print colour bitmaps on colour printers under WB 2.04. It seems to be OK under WB 1.3, and again with WB3.0 and PPage 4.0.
Versions of Post older than 1.7 have problems with eps files from Quark XPress and Freehand.
*/
/* Written by and copyright Don Cox, 1992. All rights reserved. Not Public Domain. */
trace n
signal on error
signal on syntax
address command
call SafeEndEdit.rexx()
call ppm_AutoUpdate(0)
oldunits = ppm_GetUnits()
call ppm_SetUnits(1)
cr="0a"x
prompt = "Type file name for pictures..."
basename = ppm_GetFileName(prompt, "PPage:")
pagesize = ppm_GetPageSize()
pagewidth = word(pagesize,1)
pageheight = word(pagesize,2)
pixelwidth = trunc(pagewidth*100)
pixelheight = trunc(pageheight*100)
call ppm_SetPSPageSize(pagewidth,pageheight)
oldoutput = ppm_GetPSOutput()
oldmode = ppm_GetPSPrintMode()
call ppm_SetPSFontDownload(0)
call ppm_SetPSOutput("ram:temp.ps")
call ppm_SetPSPrintMode(2)
success = ppm_PrintDocPS(1,1)
if success ~=1 then exit_msg("Failed saving temporary Postscript file.")
/* Set up a text file in ram: and then send it to a temporary command window */
conwindow = "CON:40/40/500/200/NewWindow"
call open out, "ram:temp", write /* This wipes out any existing ram:temp */
call writeln out, "cd PPage:Post" /* post is in drawer "Post" in "PPage:" - if not, change this line */