PdfBlendMode
12 Sep 20251 minute to read
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 ofcolor. -
colorBurn- Specifies the type ofcolorBurn. -
colorDodge- Specifies the type ofcolorDodge. -
darken- Specifies the type ofdarken. -
difference- Specifies the type ofdifference. -
exclusion- Specifies the type ofexclusion. -
hardLight- Specifies the type ofhardLight. -
hue- Specifies the type ofhue. -
lighten- Specifies the type oflighten. -
luminosity- Specifies the type ofluminosity. -
multiply- Specifies the type ofmultiply. -
normal- Specifies the type ofnormal. -
overlay- Specifies the type ofoverlay. -
saturation- Specifies the type ofsaturation. -
screen- Specifies the type ofscreen. -
softLight- Specifies the type ofsoftLight.