On this page you will learn from code samples for programming in VBScript and VB6.Writing of the code to create drawing template for PDF in VBScript and VB6 can be done by developers of any level using ByteScout PDF SDK. ByteScout PDF SDK is the SDK 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 and you can use it to create drawing template for PDF with VBScript and VB6.
This code snippet below for ByteScout PDF SDK works best when you need to quickly create drawing template for PDF in your VBScript and VB6 application. In your VBScript and VB6 project or application you may simply copy & paste the code and then run your app! 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.
ByteScout PDF SDK free trial version is available on our website. VBScript and VB6 and other programming languages are supported.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
' This example demonstrates how to use templates. ' Create Bytescout.PDF.Document object Set pdfDocument = CreateObject("Bytescout.PDF.Document") pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" Set comHelpers = pdfDocument.ComHelpers ' Prepare simple template (for example, a logo) and draw it on every page: ' Create template of specified size Set template = comHelpers.CreateGraphicsTemplate(250, 50) ' Draw the logo Set lightBlueBrush = comHelpers.CreateSolidBrush(comHelpers.CreateColorRGB(200, 200, 255)) template.DrawRectangle_2 (lightBlueBrush), 0, 0, 250, 50 Set timesFont = comHelpers.CreateStandardFont(comHelpers.STANDARDFONTS_TIMESBOLDITALIC, 24) Set blackBrush = comHelpers.CreateSolidBrush(comHelpers.CreateColorGray(0)) template.DrawString "My Company Logo", (timesFont), (blackBrush), 30, 10 ' Add few pages and draw the prepared template on each one For i = 0 To 2 Set page = comHelpers.CreatePage(comHelpers.PAPERFORMAT_A4) page.Canvas.DrawTemplate (template), 10, 10 pdfDocument.Pages.Add(page) Next ' 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
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: