예제 #1
0
        private void InsertFormXObj(PdfContentByte canvas, PdfDictionary pageDict, PdfStream formXObj, IList <Rectangle> clippingRects, Rectangle annotRect)
        {
            PdfName xobjName = GenerateNameForXObj(pageDict);

            canvas.SaveState();

            foreach (Rectangle rect in clippingRects)
            {
                canvas.Rectangle(rect.Left, rect.Bottom, rect.Width, rect.Height);
            }

            canvas.Clip();
            canvas.NewPath();

            canvas.AddFormXObj(formXObj, xobjName, 1, 0, 0, 1, annotRect.Left, annotRect.Bottom);

            canvas.RestoreState();
        }