ByteScout PDF Suite - VBScript - Create drawing template for pdf with pdf sdk - ByteScout

ByteScout PDF Suite – VBScript – Create drawing template for pdf with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – VBScript – Create drawing template for pdf with pdf sdk

How to create drawing template for pdf with pdf sdk in VBScript and ByteScout PDF Suite

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

The code displayed below will guide you to install an VBScript app to create drawing template for pdf with pdf sdk. ByteScout PDF Suite is the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can be applied to create drawing template for pdf with pdf sdk using VBScript.

These VBScript code samples for VBScript guide developers to speed up coding of the application when using ByteScout PDF Suite. 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! Enjoy writing a code with ready-to-use sample codes in VBScript.

ByteScout provides the free trial version of ByteScout PDF Suite along with the documentation and source code samples.

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

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

Templates.vbs
      
' 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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

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

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next