MacOSXPrinter.setPageFormat( format );
// In Cocoa there is no way of really controlling the print resolution,
// we always print at full size and then rely on the printer to do the appropriate scaling...
RenderedImage rendering = engine.getRendering(engine.getNaturalSize(),
colorProfile,
engine.getLCMSIntent(settings.getRenderingIntent()),
true);
try {
File spoolFile = File.createTempFile("LZPrintSpool", "tif");
LCTIFFWriter writer = new LCTIFFWriter(spoolFile.getAbsolutePath(),
rendering.getWidth(),
rendering.getHeight());
// No profile for Application Managed Colors
if (colorProfile == JAIContext.sRGBColorProfile)
writer.setByteField( TIFFTags.TIFF_ICC_PROFILE, colorProfile.getData());
writer.putImageStriped(rendering, thread);