We made thousands of pre-made source code pieces for easy implementation in your own programming projects. 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 color profiles in drawing in PDF in your VBScript and VB6 application.
The SDK samples like this one below explain how to quickly make your application do use color profiles in drawing in PDF in VBScript and VB6 with the help of ByteScout PDF SDK. In order to implement the functionality, you should copy and paste this code for VBScript and VB6 below into your code editor with your app, compile and run your application. Detailed tutorials and documentation are available along with installed ByteScout PDF SDK if you’d like to dive deeper into the topic and the details of the API.
Download free trial version of ByteScout PDF SDK from our website with this and other source code samples for VBScript and VB6.
' 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