//--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // g e n e r a t e P a g e                                            //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Write individual test data page sequences to output file.          //
        //                                                                    //
        //--------------------------------------------------------------------//

        private static void generatePage(BinaryWriter prnWriter,
                                         Int32 indxPaperSize,
                                         Int32 indxPaperType,
                                         Int32 indxOrientation,
                                         Boolean formAsMacro)
        {
            const Int32 sizeStd = 1024;

            Byte[] bufStd = new Byte[sizeStd];

            String sampleText  = "0123456789";
            String sampleTextA = "01234";
            String sampleTextB = "56789";

            Int16 posX,
                  posY;

            Int32 indStd;

            Int16 ptSize;

            indStd = 0;

            //----------------------------------------------------------------//

            if (indxOrientation < PCLOrientations.getCount())
            {
                PCLXLWriter.addAttrUbyte(ref bufStd,
                                         ref indStd,
                                         PCLXLAttributes.eTag.Orientation,
                                         PCLOrientations.getIdPCLXL(indxOrientation));
            }

            if (indxPaperSize < PCLPaperSizes.getCount())
            {
                PCLXLWriter.addAttrUbyte(ref bufStd,
                                         ref indStd,
                                         PCLXLAttributes.eTag.MediaSize,
                                         PCLPaperSizes.getIdPCLXL(indxPaperSize));
            }

            if ((indxPaperType < PCLPaperTypes.getCount()) &&
                (PCLPaperTypes.getType(indxPaperType) !=
                 PCLPaperTypes.eEntryType.NotSet))
            {
                PCLXLWriter.addAttrUbyteArray(ref bufStd,
                                              ref indStd,
                                              PCLXLAttributes.eTag.MediaType,
                                              PCLPaperTypes.getName(indxPaperType));
            }

            PCLXLWriter.addAttrUbyte(ref bufStd,
                                     ref indStd,
                                     PCLXLAttributes.eTag.SimplexPageMode,
                                     (Byte)PCLXLAttrEnums.eVal.eSimplexFrontSide);

            PCLXLWriter.addOperator(ref bufStd,
                                    ref indStd,
                                    PCLXLOperators.eTag.BeginPage);

            PCLXLWriter.addAttrUint16XY(ref bufStd,
                                        ref indStd,
                                        PCLXLAttributes.eTag.PageOrigin,
                                        0, 0);

            PCLXLWriter.addOperator(ref bufStd,
                                    ref indStd,
                                    PCLXLOperators.eTag.SetPageOrigin);

            PCLXLWriter.addAttrUbyte(ref bufStd,
                                     ref indStd,
                                     PCLXLAttributes.eTag.ColorSpace,
                                     (Byte)PCLXLAttrEnums.eVal.eGray);

            PCLXLWriter.addOperator(ref bufStd,
                                    ref indStd,
                                    PCLXLOperators.eTag.SetColorSpace);

            prnWriter.Write(bufStd, 0, indStd);
            indStd = 0;

            //----------------------------------------------------------------//

            if (formAsMacro)
            {
                PCLXLWriter.addAttrUbyteArray(ref bufStd,
                                              ref indStd,
                                              PCLXLAttributes.eTag.StreamName,
                                              _formName);

                PCLXLWriter.addOperator(ref bufStd,
                                        ref indStd,
                                        PCLXLOperators.eTag.ExecStream);

                prnWriter.Write(bufStd, 0, indStd);
                indStd = 0;
            }
            else
            {
                generateOverlay(prnWriter, false,
                                indxPaperSize, indxOrientation);
            }

            //----------------------------------------------------------------//
            //                                                                //
            // Descriptive text.                                              //
            //                                                                //
            //----------------------------------------------------------------//

            ptSize = 18;

            PCLXLWriter.addAttrUbyte(ref bufStd,
                                     ref indStd,
                                     PCLXLAttributes.eTag.GrayLevel,
                                     0);

            PCLXLWriter.addOperator(ref bufStd,
                                    ref indStd,
                                    PCLXLOperators.eTag.SetBrushSource);

            PCLXLWriter.addAttrUbyte(ref bufStd,
                                     ref indStd,
                                     PCLXLAttributes.eTag.NullPen,
                                     0);

            PCLXLWriter.addOperator(ref bufStd,
                                    ref indStd,
                                    PCLXLOperators.eTag.SetPenSource);

            PCLXLWriter.font(prnWriter, false, ptSize,
                             _symSet_19U, _fontNameCourier);

            posX = _posXData1;
            posY = _posYData;

            posY += _lineInc;

            PCLXLWriter.text(prnWriter, false, false,
                             PCLXLWriter.advances_Courier, ptSize,
                             posX, posY,
                             "Arial");

            posY += _lineInc;

            prnWriter.Write(bufStd, 0, indStd);
            indStd = 0;

            //----------------------------------------------------------------//
            //                                                                //
            // Embellished text.                                              //
            //                                                                //
            //----------------------------------------------------------------//

            ptSize = 36;

            PCLXLWriter.font(prnWriter, false, ptSize,
                             _symSet_19U, _fontNameArial);

            posX = _posXData2;
            posY = _posYData;

            posY += _lineInc;

            PCLXLWriter.charAngle(prnWriter, false, 0);
            PCLXLWriter.charBold(prnWriter, false, 0);
            PCLXLWriter.charScale(prnWriter, false,
                                  (Single)1.0, (Single)1.0);
            PCLXLWriter.charShear(prnWriter, false,
                                  (Single)0.0, (Single)0.0);

            PCLXLWriter.text(prnWriter, false, false,
                             PCLXLWriter.advances_Courier, ptSize,
                             posX, posY,
                             sampleText);

            //----------------------------------------------------------------//

            posY += _lineInc;

            PCLXLWriter.charAngle(prnWriter, false, -30);

            PCLXLWriter.text(prnWriter, false, false,
                             PCLXLWriter.advances_ArialRegular, ptSize,
                             posX, posY,
                             sampleText);

            //----------------------------------------------------------------//

            posY += _lineInc;

            PCLXLWriter.charShear(prnWriter, false,
                                  (Single)0.0, (Single)0.0);

            PCLXLWriter.charScale(prnWriter, false,
                                  (Single)2.0, (Single)1.0);

            PCLXLWriter.charAngle(prnWriter, false, -45);

            PCLXLWriter.textAngled(prnWriter, false,
                                   PCLXLWriter.advances_ArialRegular, ptSize,
                                   posX, posY, -45,
                                   sampleTextA);

            posX  = (Int16)(posX + ((7 * _incInch) / 4));
            posY += _lineInc;

            PCLXLWriter.charScale(prnWriter, false,
                                  (Single)1.0, (Single)2.0);

            PCLXLWriter.charAngle(prnWriter, false, 30);

            PCLXLWriter.textAngled(prnWriter, false,
                                   PCLXLWriter.advances_ArialRegular, ptSize,
                                   posX, posY, 30,
                                   sampleTextB);

            //----------------------------------------------------------------//

            prnWriter.Write(bufStd, 0, indStd);
            indStd = 0;

            //----------------------------------------------------------------//

            PCLXLWriter.addAttrUint16(ref bufStd,
                                      ref indStd,
                                      PCLXLAttributes.eTag.PageCopies,
                                      1);

            PCLXLWriter.addOperator(ref bufStd,
                                    ref indStd,
                                    PCLXLOperators.eTag.EndPage);

            prnWriter.Write(bufStd, 0, indStd);
        }