Every ByteScout tool includes simple example VBScript source codes that you can get here or in the folder with installed ByteScout product. 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 color profiles in drawing in pdf with pdf sdk in VBScript.
Want to quickly learn? This fast application programming interfaces of ByteScout Premium Suite for VBScript plus the guidelines and the code below will help you quickly learn how to use color profiles in drawing in pdf with pdf sdk. This VBScript sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Use of ByteScout Premium Suite in VBScript is also described in the documentation included along with the product.
ByteScout Premium Suite free trial version is available on our website. VBScript and other programming languages are supported.
' This example demonstrates how to use color profiles. ' 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) ' Load ICC color profile Set iccProfile = comHelpers.CreateICCBasedColorspace("USWebCoatedSWOP.icc") ' Create profiled color brush Set iccColor = comHelpers.CreateColorICC((iccProfile), comHelpers.CreateColorCMYK(0, 100, 0, 0)) Set iccBrush = comHelpers.CreateSolidBrush((iccColor)) ' Draw a circle using the brush page1.Canvas.DrawCircle_2 (iccBrush), 200, 200, 100 ' 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