/ PDF / PdfBlendMode
Search results

PdfBlendMode API in JavaScript PDF API control

Public enum to define blend mode of the PDF page.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access first page
let page: PdfPage = document.getPage(0);
// Gets the graphics of the PDF page
let graphics: PdfGraphics = page.graphics;
// Create a new font
let font: PdfStandardFont = new PdfStandardFont(PdfFontFamily.symbol, 10);
// Set the blend mode
graphics.setTransparency(0.5, 0.5, PdfBlendMode.hardLight);
// Draw the text
graphics.drawString('Hello World', font, null, new PointF(10, 10));
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
  • color - Specifies the type of color.
  • colorBurn - Specifies the type of colorBurn.
  • colorDodge - Specifies the type of colorDodge.
  • darken - Specifies the type of darken.
  • difference - Specifies the type of difference.
  • exclusion - Specifies the type of exclusion.
  • hardLight - Specifies the type of hardLight.
  • hue - Specifies the type of hue.
  • lighten - Specifies the type of lighten.
  • luminosity - Specifies the type of luminosity.
  • multiply - Specifies the type of multiply.
  • normal - Specifies the type of normal.
  • overlay - Specifies the type of overlay.
  • saturation - Specifies the type of saturation.
  • screen - Specifies the type of screen.
  • softLight - Specifies the type of softLight.