//--------------------------------------------------------------------// // M e t h o d // // g e n e r a t e J o b // //--------------------------------------------------------------------// // // // Generate test data. // // // // Some sequences are built up as (Unicode) strings, then converted // // to byte arrays before writing out - this works OK because all the // // characters we're using are within the ASCII range (0x00-0x7f) and // // are hence represented using a single byte in the UTF-8 encoding. // // // //--------------------------------------------------------------------// public static void generateJob(BinaryWriter prnWriter, Int32 indxPaperSize, Int32 indxPaperType, Int32 indxOrientation, Boolean formAsMacro, UInt32 codePoint, Int32 indxFont, PCLFonts.eVariant fontVar) { PCLOrientations.eAspect aspect; UInt16 logXOffset; //----------------------------------------------------------------// aspect = PCLOrientations.getAspect(indxOrientation); logXOffset = PCLPaperSizes.getLogicalOffset(indxPaperSize, _unitsPerInch, aspect); _logPageWidth = PCLPaperSizes.getLogPageWidth(indxPaperSize, _unitsPerInch, aspect); _logPageHeight = PCLPaperSizes.getLogPageLength(indxPaperSize, _unitsPerInch, aspect); _paperWidth = PCLPaperSizes.getPaperWidth(indxPaperSize, _unitsPerInch, aspect); _paperHeight = PCLPaperSizes.getPaperLength(indxPaperSize, _unitsPerInch, aspect); //----------------------------------------------------------------// generateJobHeader(prnWriter, indxPaperSize, indxPaperType, indxOrientation, formAsMacro, logXOffset); generatePage(prnWriter, indxPaperSize, indxPaperType, indxOrientation, formAsMacro, logXOffset, codePoint, indxFont, fontVar); generateJobTrailer(prnWriter, formAsMacro); }
//--------------------------------------------------------------------// // M e t h o d // // g e n e r a t e J o b // //--------------------------------------------------------------------// // // // Generate test data. // // // // Some sequences are built up as (Unicode) strings, then converted // // to byte arrays before writing out - this works OK because all the // // characters we're using are within the ASCII range (0x00-0x7f) and // // are hence represented using a single byte in the UTF-8 encoding. // // // //--------------------------------------------------------------------// public static void generateJob(BinaryWriter prnWriter, Int32 indxPaperSize, Int32 indxPaperType, Int32 indxOrientation, Boolean formAsMacro) { PCLOrientations.eAspect aspect; UInt16 logXOffset; //----------------------------------------------------------------// aspect = PCLOrientations.getAspect(indxOrientation); logXOffset = PCLPaperSizes.getLogicalOffset(indxPaperSize, _unitsPerInch, aspect); _logPageWidth = PCLPaperSizes.getLogPageWidth(indxPaperSize, _unitsPerInch, aspect); _logPageHeight = PCLPaperSizes.getLogPageLength(indxPaperSize, _unitsPerInch, aspect); _paperWidth = PCLPaperSizes.getPaperWidth(indxPaperSize, _unitsPerInch, aspect); _paperHeight = PCLPaperSizes.getPaperLength(indxPaperSize, _unitsPerInch, aspect); //----------------------------------------------------------------// getPatternData(); generateJobHeader(prnWriter, indxPaperSize, indxPaperType, indxOrientation, formAsMacro, logXOffset); patternDefineDpi300(prnWriter, _patternBase_300); patternDefineDpi600(prnWriter, _patternBase_600); generatePage(prnWriter, indxPaperSize, indxPaperType, indxOrientation, formAsMacro, logXOffset); patternDeleteSet(prnWriter, _patternBase_300); patternDeleteSet(prnWriter, _patternBase_600); generateJobTrailer(prnWriter, formAsMacro); }