private static void drawXObject(PDImageXObject xobject, PDResources resources, OutputStream os, float x, float y, float width, float height) { COSName cOSName = resources.@add(xobject); PDFHelper.appendRawCommands(os, PDFHelper.SAVE_GRAPHICS_STATE); PDFHelper.appendRawCommands(os, PDFHelper.formatDecimal.format((double)width)); PDFHelper.appendRawCommands(os, PDFHelper.SPACE); PDFHelper.appendRawCommands(os, PDFHelper.formatDecimal.format((long)0)); PDFHelper.appendRawCommands(os, PDFHelper.SPACE); PDFHelper.appendRawCommands(os, PDFHelper.formatDecimal.format((long)0)); PDFHelper.appendRawCommands(os, PDFHelper.SPACE); PDFHelper.appendRawCommands(os, PDFHelper.formatDecimal.format((double)height)); PDFHelper.appendRawCommands(os, PDFHelper.SPACE); PDFHelper.appendRawCommands(os, PDFHelper.formatDecimal.format((double)x)); PDFHelper.appendRawCommands(os, PDFHelper.SPACE); PDFHelper.appendRawCommands(os, PDFHelper.formatDecimal.format((double)y)); PDFHelper.appendRawCommands(os, PDFHelper.SPACE); PDFHelper.appendRawCommands(os, PDFHelper.CONCATENATE_MATRIX); PDFHelper.appendRawCommands(os, PDFHelper.SPACE); PDFHelper.appendRawCommands(os, "/"); PDFHelper.appendRawCommands(os, cOSName.getName()); PDFHelper.appendRawCommands(os, PDFHelper.SPACE); PDFHelper.appendRawCommands(os, PDFHelper.XOBJECT_DO); PDFHelper.appendRawCommands(os, PDFHelper.SPACE); PDFHelper.appendRawCommands(os, PDFHelper.RESTORE_GRAPHICS_STATE); }