ByteScout PDF SDK - VBScript and VB6 - Use Blend Mode for Drawing in PDF - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF SDK – VBScript and VB6 – Use Blend Mode for Drawing in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Use Blend Mode for Drawing in PDF

How to use blend mode for drawing in PDF in VBScript and VB6 using ByteScout PDF SDK

This tutorial will show how to use blend mode for drawing in PDF in VBScript and VB6

These sample source codes on this page below are demonstrating how to use blend mode for drawing in PDF in VBScript and VB6. What is ByteScout PDF SDK? It is the library for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings. It can help you to use blend mode for drawing in PDF in your VBScript and VB6 application.

VBScript and VB6 code samples for VBScript and VB6 developers help to speed up coding of your application when using ByteScout PDF SDK. In your VBScript and VB6 project or application you may simply copy & paste the code and then run your app! Further enhancement of the code will make it more vigorous.

Free trial version of ByteScout PDF SDK is available for download from our website. Get it to try other source code samples for VBScript and VB6.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

BlendMode.vbs
      
' This example demonstrates how to use blend modes - a way how ' intersecting semi-transparent objects will blend on page canvas. ' Create Bytescout.PDF.Document object Set pdfDocument = CreateObject("Bytescout.PDF.Document") pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" Set comHelpers = pdfDocument.ComHelpers ' Add page Set page1 = comHelpers.CreatePage(comHelpers.PAPERFORMAT_A4) pdfDocument.Pages.Add(page1) Set canvas = page1.Canvas ' Create transparent brushes Set brushRed = comHelpers.CreateSolidBrush(comHelpers.CreateColorRGB(255, 0, 0)) brushRed.Opacity = 50 Set brushGreen = comHelpers.CreateSolidBrush(comHelpers.CreateColorRGB(0, 255, 0)) brushGreen.Opacity = 50 Set brushBlue = comHelpers.CreateSolidBrush(comHelpers.CreateColorRGB(0, 0, 255)) brushBlue.Opacity = 50 ' Normal blending canvas.BlendMode = comHelpers.BLENDMODE_NORMAL canvas.DrawCircle_2 (brushRed), 100, 100, 50 canvas.DrawCircle_2 (brushGreen), 100, 150, 50 canvas.DrawCircle_2 (brushBlue), 150, 100, 50 ' Darken blending canvas.BlendMode = comHelpers.BLENDMODE_DARKEN canvas.DrawCircle_2 (brushRed), 300, 100, 50 canvas.DrawCircle_2 (brushGreen), 300, 150, 50 canvas.DrawCircle_2 (brushBlue), 350, 100, 50 ' Lighten blending canvas.BlendMode = comHelpers.BLENDMODE_LIGHTEN canvas.DrawCircle_2 (brushRed), 100, 300, 50 canvas.DrawCircle_2 (brushGreen), 100, 350, 50 canvas.DrawCircle_2 (brushBlue), 150, 300, 50 ' Color burn blending canvas.BlendMode = comHelpers.BLENDMODE_COLORBURN canvas.DrawCircle_2 (brushRed), 300, 300, 50 canvas.DrawCircle_2 (brushGreen), 300, 350, 50 canvas.DrawCircle_2 (brushBlue), 350, 300, 50 ' Save document to file pdfDocument.Save("result.pdf") ' Open document in default PDF viewer app Set shell = CreateObject("WScript.Shell") shell.Run "result.pdf", 1, false

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next