Exemple #1
0
        private void initCoordinates()
        {
            _coordinates = new PointsArray();
            PDFArray array = Dictionary["L"] as PDFArray;

            if (array == null)
            {
                _coordinates.AddPoint(new PointF(0, 0));
                _coordinates.AddPoint(new PointF(0, 0));
            }
            else
            {
                if (array.Count != 2)
                {
                    _coordinates.AddPoint(new PointF(0, 0));
                    _coordinates.AddPoint(new PointF(0, 0));
                    Dictionary.AddItem("L", _coordinates.Array);
                }
                else
                {
                    _coordinates = new PointsArray(array, Page);
                }
            }
        }
Exemple #2
0
        public void TesPolylineAnnotation()
        {
            Document document = new Document();

            document.Pages.Add(new Page(PaperFormat.A4));
            PointsArray points = new PointsArray();

            points.AddPoint(new Point(150, 275));
            points.AddPoint(new Point(250, 150));
            points.AddPoint(new Point(350, 275));
            points.AddPoint(new Point(125, 200));
            points.AddPoint(new Point(375, 200));
            points.AddPoint(new Point(150, 275));
            PolylineAnnotation annot = new PolylineAnnotation(points);

            annot.Contents = "Polyline annotations...";

            document.Pages[0].Annotations.Add(annot);
            document.Save(OutputFolder + @"\TestPolylineAnnotation.pdf");
            document.Dispose();

            //Process.Start("TestPolylineAnnotation.pdf");
        }