ByteScout PDF SDK - VB.NET - Draw with Blend Mode in PDF - ByteScout

ByteScout PDF SDK – VB.NET – Draw with Blend Mode in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VB.NET – Draw with Blend Mode in PDF

How to draw with blend mode in PDF in VB.NET using ByteScout PDF SDK

How to code in VB.NET to draw with blend mode in PDF with this step-by-step tutorial

Every ByteScout tool contains example VB.NET source codes that you can find here or in the folder with installed ByteScout product. ByteScout PDF SDK is the pdf library that can create, update and modify PDF files. Supports text with fonts and style selections, layers, form fields, drawing lines and objects, automatic tables, images. Can be used to create and fill pdf forms. It can be used to draw with blend mode in PDF using VB.NET.

This rich sample source code in VB.NET for ByteScout PDF SDK includes the number of functions and options you should do calling the API to draw with blend mode in PDF. Just copy and paste the code into your VB.NET application’s code and follow the instruction. Implementing VB.NET application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Free trial version of ByteScout PDF SDK is available on our website. Documentation and source code samples are included.

Try ByteScout PDF SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to use blend modes - a way how ''' intersecting semi-transparent objects will blend on page canvas. ''' </summary> Class Program Shared Sub Main() ' Create new document Dim pdfDocument = New Document() pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" ' Add page Dim page = New Page(PaperFormat.A4) pdfDocument.Pages.Add(page) Dim canvas = page.Canvas ' Create transparent brushes Dim brushRed = New SolidBrush(New ColorRGB(255, 0, 0)) brushRed.Opacity = 50 Dim brushGreen = New SolidBrush(New ColorRGB(0, 255, 0)) brushGreen.Opacity = 50 Dim brushBlue = New SolidBrush(New ColorRGB(0, 0, 255)) brushBlue.Opacity = 50 ' Normal blending canvas.BlendMode = BlendMode.Normal canvas.DrawCircle(brushRed, 100, 100, 50) canvas.DrawCircle(brushGreen, 100, 150, 50) canvas.DrawCircle(brushBlue, 150, 100, 50) ' Darken blending canvas.BlendMode = BlendMode.Darken canvas.DrawCircle(brushRed, 300, 100, 50) canvas.DrawCircle(brushGreen, 300, 150, 50) canvas.DrawCircle(brushBlue, 350, 100, 50) ' Lighten blending canvas.BlendMode = BlendMode.Lighten canvas.DrawCircle(brushRed, 100, 300, 50) canvas.DrawCircle(brushGreen, 100, 350, 50) canvas.DrawCircle(brushBlue, 150, 300, 50) ' Color burn blending canvas.BlendMode = BlendMode.ColorBurn canvas.DrawCircle(brushRed, 300, 300, 50) canvas.DrawCircle(brushGreen, 300, 350, 50) canvas.DrawCircle(brushBlue, 350, 300, 50) ' Save document to file pdfDocument.Save("result.pdf") ' Cleanup pdfDocument.Dispose() ' Open document in default PDF viewer app Process.Start("result.pdf") End Sub End Class

Try ByteScout PDF SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)



Get 60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Get ByteScout PDF SDK Free Training


Get Your Free API Key

Explore Web API Documentation