/* 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. */
/* Note: There is a bug in Post which means that it will refuse to print colour bitmaps on colour printers under WB 2.04. It seems to be OK under WB 1.3.
Also, gradient fills do not work in colour. Colour separations and B&W are OK.
Versions of Post older than 1.7 have problems with files from Quark XPress and Freehand.
*/
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")
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 */
call writeln out, "post init.ps PPage:temp.ps" /* To use lots of fonts in one document, add memory to Post here. See Post documentation. */
call writeln out, "delete PPage:temp.ps"
call writeln out, "endcli"
call close out
"newcli" conwindow "ram:temp"
call ppm_SetPSOutput(oldoutput)
call exit_msg()
end
error:
syntax:
do
exit_msg("Genie failed due to error: "errortext(rc))