iTextSharp.text.pdf.PdfDocument.InitPage C# (CSharp) Метод

InitPage() защищенный Метод

protected InitPage ( ) : void
Результат void
        protected internal void InitPage()
        {
            // the pagenumber is incremented
            pageN++;

            // initialisation of some page objects
            annotationsImp.ResetAnnotations();
            pageResources = new PageResources();

            writer.ResetContent();
            graphics = new PdfContentByte(writer);

            markPoint = 0;
            SetNewPageSizeAndMargins();
            imageEnd = -1;
            indentation.imageIndentRight = 0;
            indentation.imageIndentLeft = 0;
            indentation.indentBottom = 0;
            indentation.indentTop = 0;
            currentHeight = 0;

            // backgroundcolors, etc...
            thisBoxSize = new Dictionary<String, PdfRectangle>(boxSize);
            if (pageSize.BackgroundColor != null
            || pageSize.HasBorders()
            || pageSize.BorderColor != null) {
                Add(pageSize);
            }

            float oldleading = leading;
            int oldAlignment = alignment;
            pageEmpty = true;
            // if there is an image waiting to be drawn, draw it
            if (imageWait != null) {
                Add(imageWait);
                imageWait = null;
            }
            leading = oldleading;
            alignment = oldAlignment;
            CarriageReturn();

            IPdfPageEvent pageEvent = writer.PageEvent;
            if (pageEvent != null) {
                if (firstPageEvent) {
                    pageEvent.OnOpenDocument(writer, this);
                }
                pageEvent.OnStartPage(writer, this);
            }
            firstPageEvent = false;
        }