Ghostscript fails with /undefined in --setpagedevice-- when it runs the following command gs -dNOMEDIAATTRS -c '<< /PageSize [181.41732788085938 257.9527587890625] /DeferredMediaSelection true /ImagingBBox null /ManualFeed false /NumCopies 1 >> setpagedevice' A similar error has been reported earlier in ESP Ghostscript. http://www.velocityreviews.com/forums/t366343-cups-printing-to-pdf-writer-from-java-app-fails.html
Revert initial /PolicyNotFount to 1. The previous value, 7, introduced by ESP Ghostscript merger (rev. 8026) was non-standard and handled by Ghostscript like 0. Fix '/undefined in --setpagedevice--' error in CUPS mode (-dNOMEDIAATTRS) when setpagedevice request has unsupported keys. The following patch is committed as a rev. 9616. http://ghostscript.com/pipermail/gs-cvs/2009-April/009191.html