ByteScout Premium Suite - VBScript - Use blend mode for drawing in pdf with pdf sdk - ByteScout

ByteScout Premium Suite – VBScript – Use blend mode for drawing in pdf with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – VBScript – Use blend mode for drawing in pdf with pdf sdk

How to use blend mode for drawing in pdf with pdf sdk in VBScript with ByteScout Premium Suite

Learning is essential in computer world and the tutorial below will demonstrate how to use blend mode for drawing in pdf with pdf sdk in VBScript

An easy to understand sample source code to learn how to use blend mode for drawing in pdf with pdf sdk in VBScript ByteScout Premium Suite: the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can use blend mode for drawing in pdf with pdf sdk in VBScript.

The SDK samples given below describe how to quickly make your application do use blend mode for drawing in pdf with pdf sdk in VBScript with the help of ByteScout Premium Suite. Follow the instructions from scratch to work and copy the VBScript code. Use of ByteScout Premium Suite in VBScript is also described in the documentation included along with the product.

You can download free trial version of ByteScout Premium Suite from our website with this and other source code samples for VBScript.

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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next