Exemplo n.º 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        internal PdfGraphics(PdfPage page, PdfDocument doc)
        {
            this.page = page;
            stream = new PdfStream();
            PdfDocument.RegisterForOutput(stream);
            page.RegisterContentStream(stream.IndirectReference);

            // Add the transform matrix for the graphics state
        }
Exemplo n.º 2
0
        private float width; // The width and height of the document

        #endregion Fields

        #region Constructors

        internal PdfPage(Pages parentObj, PdfDocument doc, float pageHeight, float pageWidth)
        {
            // Set the width and height properties
            this.width = pageWidth * USER_SPACE_RESOLUTION;
            this.height = pageHeight * USER_SPACE_RESOLUTION;

            this.Add(type, new PdfName("PdfPage"));
            this.Add(parent, parentObj.IndirectReference);
            this.Add(resources, new PdfDictionary());			// TODO: This is not right
            this.Add(mediaBox, new PdfRectangleF(new PdfReal(0), new PdfReal(0), new PdfReal(width), new PdfReal(height)));
            this.doc = doc;
        }