/ PDF / PdfHighlightMode
Search results

PdfHighlightMode API in JavaScript PDF API control

Public Enum to define highlight mode of text box field.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access text box field
let field: PdfTextBoxField = document.form.fieldAt(0) as PdfTextBoxField;
// Sets the highlight mode of text box field as outline
field.highlightMode = PdfHighlightMode.outline;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
  • invert - Specifies the type of invert.
  • noHighlighting - Specifies the type of noHighlighting.
  • outline - Specifies the type of outline.
  • push - Specifies the type of push.