Draw tables in pdf with pdf sdk is simple to apply in VBScript if you use these source codes below. Want to draw tables in pdf with pdf sdk in your VBScript app? ByteScout Premium Suite is designed for it. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.
These VBScript code samples for VBScript guide developers to speed up coding of the application when using ByteScout Premium Suite. Just copy and paste the code into your VBScript application’s code and follow the instructions. Use of ByteScout Premium Suite in VBScript is also described in the documentation included along with the product.
If you want to try other source code samples then the free trial version of ByteScout Premium Suite is available for download from our website. Just try 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)
' This example demonstrates how to create tables. ' 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 lightGrayColor = comHelpers.CreateColorGray(200) Set whiteColor = comHelpers.CreateColorGray(255) Set lightBlueColor = comHelpers.CreateColorRGB(200, 200, 250) Set lightRedColor = comHelpers.CreateColorRGB(255, 200, 200) ' Create a table and set default background color Set table = comHelpers.CreateTable() table.BackgroundColor = lightGrayColor ' Add row headers column and set its color table.Columns.Add(comHelpers.CreateTableColumn("RowHeaders", "")) table.Columns.Item(0).BackgroundColor = lightGrayColor ' Add columns A, B, C, ... For c = 0 To 9 columnName = Chr(65 + c) table.Columns.Add(comHelpers.CreateTableColumn(columnName, columnName)) Next ' Add rows For r = 0 To 9 ' Create new row and set its background color Set row = table.NewRow() row.BackgroundColor = whiteColor ' Set row header text row("RowHeaders").Text = CStr(r + 1) ' Set cell text For c = 0 To 9 columnName = Chr(65 + c) row(columnName).Text = columnName + CStr(r + 1) Next ' Add the row to the table table.Rows.Add(row) Next ' Decorate the table table.Rows.Item(1)("B").BackgroundColor = lightRedColor table.Columns.Item(2).BackgroundColor = lightBlueColor table.Rows.Item(1).BackgroundColor = lightBlueColor table.Rows.Item(1)("RowHeaders").BackgroundColor = lightBlueColor ' Draw the table on canvas page1.Canvas.DrawTable (table), 20, 20 ' 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 Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: