Пример #1
0
 public Page(PDF pdf, float[] pageSize)
 {
     float[] array = new float[3];
     this.pen = array;
     float[] array2 = new float[3];
     this.brush       = array2;
     this.pen_width   = -1f;
     this.linePattern = "[] 0";
     this.savedStates = new List <State>();
     //base..ctor();
     this.pdf          = pdf;
     this.annots       = new List <Annotation>();
     this.destinations = new List <Destination>();
     this.width        = pageSize[0];
     this.height       = pageSize[1];
     this.buf          = new MemoryStream(8192);
     if (pdf != null)
     {
         pdf.AddPage(this);
     }
 }
Пример #2
0
        /**
         *  Creates page object and add it to the PDF document.
         *
         *  Please note:
         *  <pre>
         *  The coordinate (0.0, 0.0) is the top left corner of the page.
         *  The size of the pages are represented in points.
         *  1 point is 1/72 inches.
         *  </pre>
         *
         *  @param pdf the pdf object.
         *  @param pageSize the page size of this page.
         *  @param addPageToPDF bool flag.
         */
        public Page(PDF pdf, float[] pageSize, bool addPageToPDF)
        {
            this.pdf = pdf;
            contents = new List<Int32>();
            annots = new List<Annotation>();
            destinations = new List<Destination>();
            width = pageSize[0];
            height = pageSize[1];
            buf = new MemoryStream(8192);

            if (addPageToPDF) {
            pdf.AddPage(this);
            }
        }