ByteScout PDF Suite - VBScript - Copy pages from one pdf document to another with pdf sdk - ByteScout

ByteScout PDF Suite – VBScript – Copy pages from one pdf document to another with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – VBScript – Copy pages from one pdf document to another with pdf sdk

How to copy pages from one pdf document to another with pdf sdk in VBScript using ByteScout PDF Suite

Learning is essential in computer world and the tutorial below will demonstrate how to copy pages from one pdf document to another with pdf sdk in VBScript

The sample shows instructions and algorithm of how to copy pages from one pdf document to another with pdf sdk and how to make it run in your VBScript application. 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. It can be applied to copy pages from one pdf document to another with pdf sdk using VBScript.

This prolific sample source code in VBScript for ByteScout PDF Suite contains various functions and other necessary options you should do calling the API to copy pages from one pdf document to another with pdf sdk. Just copy and paste the code into your VBScript application’s code and follow the instructions. Check VBScript sample code samples to see if they respond to your needs and requirements for the project.

If you want to try other source code samples then the free trial version of ByteScout PDF 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)

CopyPagesFromOneDocumentToAnother.vbs
      
' This example demonstrates how to copy pages from one document to another ' Open first document Set pdfDocument1 = CreateObject("Bytescout.PDF.Document") pdfDocument1.RegistrationName = "demo" pdfDocument1.RegistrationKey = "demo" pdfDocument1.Load("document1.pdf") ' Open second document Set pdfDocument2 = CreateObject("Bytescout.PDF.Document") pdfDocument2.RegistrationName = "demo" pdfDocument2.RegistrationKey = "demo" pdfDocument2.Load("document2.pdf") ' Add pages from document2 to document1 For i = 0 To pdfDocument2.Pages.Count - 1 pdfDocument1.Pages.Add(pdfDocument2.Pages.Item(i)) Next ' Save document to file pdfDocument1.Save("merged.pdf") ' Open document in default PDF viewer app Set shell = CreateObject("WScript.Shell") shell.Run "merged.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