};
pageContext.initialisePage(volantis, requestContext,
null, null, null);
final DefaultDevice dev = new DefaultDevice("myDevice", null, null);
dev.setPolicyValue("protocol", "XHTMLBasic");
dev.setPolicyValue("rendermode", "not-monochrome");
dev.setPolicyValue("pixeldepth", "32");
dev.setPolicyValue("jpeginpage", "true");
dev.setPolicyValue("cjpeg24rule", rule);
dev.setPolicyValue("preferredimagetype", "JPEG");
// Set width on device.
if (deviceWidth != 0) {
dev.setPolicyValue("pixelsx",
StringConvertor.valueOf(deviceWidth));
}
final InternalDevice internalDevice =
INTERNAL_DEVICE_FACTORY.createInternalDevice(dev);