ByteScout PDF Suite - VBScript - Add images in pdf with pdf sdk - ByteScout

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

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

How to add images in pdf with pdf sdk in VBScript with ByteScout PDF Suite

Learning is essential in computer world and the tutorial below will demonstrate how to add images in pdf with pdf sdk in VBScript

The sample shows instructions and algorithm of how to add images in pdf with pdf sdk and how to make it run in your VBScript application. Want to add images in pdf with pdf sdk in your VBScript app? ByteScout PDF Suite is designed for it. ByteScout PDF Suite is the set that includes 6 SDK products 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.

The SDK samples given below describe how to quickly make your application do add images in pdf with pdf sdk in VBScript with the help of ByteScout PDF Suite. Simply copy and paste in your VBScript project or application you and then run your app! Check VBScript sample code samples to see if they respond to your needs and requirements for the project.

Our website gives trial version of ByteScout PDF Suite for free. It also includes 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)

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 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