Пример #1
0
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // g e n e r a t e J o b H e a d e r                                  //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Write stream initialisation sequences to output file.              //
        //                                                                    //
        //--------------------------------------------------------------------//

        private static void generateJobHeader(BinaryWriter prnWriter,
                                              Int32 indxPaperSize,
                                              Int32 indxPaperType,
                                              Int32 indxOrientation,
                                              Int32 indxPlexMode,
                                              String pjlCommand,
                                              Boolean formAsMacro,
                                              Boolean customPaperSize,
                                              UInt16 paperWidth,
                                              UInt16 paperLength,
                                              UInt16 logXOffset,
                                              Single scaleText)
        {
            PCLWriter.stdJobHeader(prnWriter, pjlCommand);

            if (formAsMacro)
            {
                generateOverlay(prnWriter, true,
                                paperWidth, paperLength, logXOffset, scaleText);
            }

            if (customPaperSize)
            {
                PCLWriter.pageHeaderCustom(prnWriter,
                                           indxPaperType,
                                           indxOrientation,
                                           indxPlexMode,
                                           paperWidth,
                                           paperLength);
            }
            else
            {
                PCLWriter.pageHeader(prnWriter,
                                     indxPaperSize,
                                     indxPaperType,
                                     indxOrientation,
                                     indxPlexMode);
            }
        }