/ PDF / PdfLineEndingStyle
Search results

PdfLineEndingStyle API in JavaScript PDF API control

Public Enum to define line ending style.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access first page
let page: PdfPage = document.getPage(0);
// Access the annotation at index 0
let annotation: PdfPolyLineAnnotation = page.annotations.at(0) as PdfPolyLineAnnotation;
// Sets the begin line end style as openArrow
annotation.beginLineStyle = PdfLineEndingStyle.openArrow;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
  • butt - Specifies the type of butt.
  • circle - Specifies the type of circle.
  • closedArrow - Specifies the type of closedArrow.
  • diamond - Specifies the type of diamond.
  • none - Specifies the type of none.
  • openArrow - Specifies the type of openArrow.
  • rClosedArrow - Specifies the type of rClosedArrow.
  • rOpenArrow - Specifies the type of rOpenArrow.
  • slash - Specifies the type of slash.
  • square - Specifies the type of square.