iTextSharp.text.pdf.PdfContentByte.Add C# (CSharp) Метод

Add() публичный метод

public Add ( PdfContentByte other ) : void
other PdfContentByte
Результат void
        public void Add(PdfContentByte other)
        {
            if (other.writer != null && writer != other.writer)
                throw new Exception(MessageLocalization.GetComposedMessage("inconsistent.writers.are.you.mixing.two.documents"));
            content.Append(other.content);
        }

Usage Example

Пример #1
0
        protected override void Draw(PdfContentByte cb)
        {
            //TODO if width and height not know: what to do
            //PdfTemplate template = cb.CreateTemplate(this.width, this.height);		
            PdfTemplate template = cb.CreateTemplate(500, 500);
            //draw the list of elements on the new template
            foreach (IElement elem in this.list)
            {
                Graphic graphic = (Graphic)elem;

                if (applyCSSToElements)
                {
                    graphic.Draw(template, GetCombinedCss(graphic.GetCss(), GetCss()));
                }
                else
                {
                    graphic.Draw(template, graphic.GetCss());
                }
            }
            //add the template at the x, y position
            System.Drawing.Drawing2D.Matrix translation = new System.Drawing.Drawing2D.Matrix();
            translation.Translate(this.x, this.y);
            cb.ConcatCTM(translation);

            cb.Add(template);
        }
All Usage Examples Of iTextSharp.text.pdf.PdfContentByte::Add
PdfContentByte