PDF XLSX
Aspose.PDF  for .NET
PDF

Get Polyline Annotations in PDF document via C#

Build your own .NET apps to manipulate comments & authors in document files using server-side APIs.

Package Manager Console Command


   PM> Install-Package Aspose.PDF

Get Polyline Annotation via .NET

You need aspose.pdf.dll to try the code in your environment.

  • Load PDF in an instance of Document class
  • Create a new page or get a reference to an existing one
  • Create Polyline annotation
  • Call method Get for Polyline annotation from Page.Annotations collections
  • Save the file again

System Requirements

Aspose.PDF for .NET is supported on all major operating systems. Just make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, and PHP, VBScript, Delphi, C++ via COM Interop
  • Development environment like Microsoft Visual Studio.
  • Aspose.PDF for .NET DLL referenced in your project.
 

Get Polyline Annotations from PDF - C#


    // Load the PDF file
    Document document = new Document(System.IO.Path.Combine(_dataDir, "sample_Polyline.pdf"));
    var PolylineAnnotations = document.Pages[1].Annotations
        .Where(a => a.AnnotationType == AnnotationType.Polyline)
        .Cast<PolylineAnnotation>();
    foreach (var ca in PolylineAnnotations)
    {
        Console.WriteLine($"{ca.Rect}");
    }
 
  • About Aspose.PDF for .NET API

    Aspose.PDF for .NET API can be used for PDF document manipulation and parsing within applications. One can create, modify, compress, secure, print or save PDF to TXT, HTML, PCL, XFA, XML, XPS, EPUB, TEX, Images and more formats. Aspose.PDF is a standalone API and it does not depend on any software including Adobe Acrobat.

    Remove Annotation from PDF via Online App