ByteScout Premium Suite - VBScript - Add images in pdf with pdf sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Premium Suite – VBScript – Add images in pdf with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – VBScript – Add images in pdf with pdf sdk

How to add images in pdf with pdf sdk in VBScript using ByteScout Premium Suite

Learn to add images in pdf with pdf sdk in VBScript

Source code documentation samples give simple and easy method to install a needed feature into your application. What is ByteScout Premium Suite? It is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can help you to add images in pdf with pdf sdk in your VBScript application.

The following code snippet for ByteScout Premium Suite works best when you need to quickly add images in pdf with pdf sdk in your VBScript application. IF you want to implement the functionality, just copy and paste this code for VBScript below into your code editor with your app, compile and run your application. 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.

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

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

Images.vbs
      
' This example demonstrates how to add images of various formats. ' 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 canvas = page1.Canvas ' Add JPEG image and draw unscaled Set image1 = comHelpers.CreateImage("Image1.jpg") canvas.DrawImage (image1), 20, 20 ' Add PNG image and draw reduced twice Set image2 = comHelpers.CreateImage("Image2.png") canvas.DrawImage_2 (image2), 20, 520, image2.Width / 2, image2.Height / 2 ' Add TIFF image and draw scaled disproportionately Set image3 = comHelpers.CreateImage("Image3.tif") canvas.DrawImage_2 (image3), 270, 520, image3.Width / 2, image3.Height / 4 ' Add GIF image and draw rotated 90 degrees and scaled Set image4 = comHelpers.CreateImage("Image4.gif") canvas.TranslateTransform 390, 650 canvas.RotateTransform 90 canvas.DrawImage_2 (image4), 0, 0, image4.Width / 4, image4.Height / 4 ' 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

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

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next