menu

Document Processing

PdfBlendMode Class - C# PDF Library API Reference | Syncfusion

    Show / Hide Table of Contents

    PdfBlendMode Class

    Specifies the blend mode for transparency.

    Inheritance
    System.Object
    PdfBlendMode
    Namespace: Syncfusion.Pdf.Graphics
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public sealed class PdfBlendMode : Enum
    Examples
    // Create a PDF Document.
    PdfDocument doc = new PdfDocument();
    //Add pages to the document
    PdfPage page = doc.Pages.Add();
    //Create PDF graphics for the page
    PdfGraphics graphics = page.Graphics;
    //Create PDF font.
    PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12, PdfFontStyle.Regular);
    //Set transparancy.
    graphics.SetTransparency(0.5f, 0.5f, PdfBlendMode.HardLight);
    //Draws the String.
    graphics.DrawString("Hello world!", font, PdfPens.Black, PdfBrushes.Red, 0, 0);        
    //Save the document
    doc.Save("Output.pdf");
    //Close the document
    doc.Close(true);
    ' Create a PDF Document.
    Dim doc As New PdfDocument()
    'Add pages to the document
    Dim page As PdfPage = doc.Pages.Add()
    'Create PDF graphics for the page
    Dim graphics As PdfGraphics = page.Graphics
    'Create PDF font.
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12, PdfFontStyle.Regular)
    'Set transparancy.
    graphics.SetTransparency(0.5F, 0.5F, PdfBlendMode.HardLight)
    'Draws the String.
    graphics.DrawString("Hello world!", font, PdfPens.Black, PdfBrueshes.Red, 0, 0)        
    'Save the document
    doc.Save("Output.pdf")
    'Close the document
    doc.Close(True)

    Fields

    Color

    Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.

    Declaration
    public const PdfBlendMode Color
    Field Value
    Type
    PdfBlendMode

    ColorBurn

    Darkens the backdrop color to reflect the source color. Painting with white produces no change.

    Declaration
    public const PdfBlendMode ColorBurn
    Field Value
    Type
    PdfBlendMode

    ColorDodge

    Brightens the backdrop color to reflect the source color. Painting with black produces no changes.

    Declaration
    public const PdfBlendMode ColorDodge
    Field Value
    Type
    PdfBlendMode

    Darken

    Selects the darker of the backdrop and source colors. The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged.

    Declaration
    public const PdfBlendMode Darken
    Field Value
    Type
    PdfBlendMode

    Difference

    Subtracts the darker of the two constituent colors from the lighter color. Painting with white inverts the backdrop color; painting with black produces no change.

    Declaration
    public const PdfBlendMode Difference
    Field Value
    Type
    PdfBlendMode

    Exclusion

    Produces an effect similar to that of the Difference mode but lower in contrast. Painting with white inverts the backdrop color; painting with black produces no change.

    Declaration
    public const PdfBlendMode Exclusion
    Field Value
    Type
    PdfBlendMode

    HardLight

    Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.

    Declaration
    public const PdfBlendMode HardLight
    Field Value
    Type
    PdfBlendMode

    Hue

    Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.

    Declaration
    public const PdfBlendMode Hue
    Field Value
    Type
    PdfBlendMode

    Lighten

    Selects the lighter of the backdrop and source colors. The backdrop is replaced with the source where the source is lighter; otherwise, it is left unchanged.

    Declaration
    public const PdfBlendMode Lighten
    Field Value
    Type
    PdfBlendMode

    Luminosity

    Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.

    Declaration
    public const PdfBlendMode Luminosity
    Field Value
    Type
    PdfBlendMode

    Multiply

    Multiplies the backdrop and source color values. The result color is always at least as dark as either of the two constituent colors. Multiplying any color with black produces black; multiplying with white leaves the original color unchanged. Painting successive overlapping objects with a color other than black or white produces progressively darker colors.

    Declaration
    public const PdfBlendMode Multiply
    Field Value
    Type
    PdfBlendMode

    Normal

    Selects the source color, ignoring the backdrop.

    Declaration
    public const PdfBlendMode Normal
    Field Value
    Type
    PdfBlendMode

    Overlay

    Multiplies or screens the colors, depending on the backdrop color value. Source colors overlay the backdrop while preserving its highlights and shadows. The backdrop color is not replaced but is mixed with the source color to reflect the lightness or darkness of the backdrop.

    Declaration
    public const PdfBlendMode Overlay
    Field Value
    Type
    PdfBlendMode

    Saturation

    Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color. Painting with this mode in an area of the backdrop that is a pure gray (no saturation) produces no change.

    Declaration
    public const PdfBlendMode Saturation
    Field Value
    Type
    PdfBlendMode

    Screen

    Multiplies the complements of the backdrop and source color values, then complements the result. The result color is always at least as light as either of the two constituent colors. Screening any color with white produces white; screening with black leaves the original color unchanged. The effect is similar to projecting multiple photographic slides simultaneously onto a single screen.

    Declaration
    public const PdfBlendMode Screen
    Field Value
    Type
    PdfBlendMode

    SoftLight

    Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.

    Declaration
    public const PdfBlendMode SoftLight
    Field Value
    Type
    PdfBlendMode
    Back to top Generated by DocFX
    OSZAR »
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved
    OSZAR »