ByteScout PDF SDK - VBScript and VB6 - Copy Pages From One PDF Document To Another - ByteScout

ByteScout PDF SDK – VBScript and VB6 – Copy Pages From One PDF Document To Another

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Copy Pages From One PDF Document To Another

How to copy pages from one PDF document to another in VBScript and VB6 and ByteScout PDF SDK

This tutorial will show how to copy pages from one PDF document to another in VBScript and VB6

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. ByteScout PDF SDK is the SDK for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings and you can use it to copy pages from one PDF document to another with VBScript and VB6.

Fast application programming interfaces of ByteScout PDF SDK for VBScript and VB6 plus the instruction and the code below will help you quickly learn how to copy pages from one PDF document to another. In order to implement the functionality, you should copy and paste this code for VBScript and VB6 below into your code editor with your app, compile and run your application. Use of ByteScout PDF SDK in VBScript and VB6 is also explained in the documentation included along with the product.

Free trial version of ByteScout PDF SDK is available for download from our website. Get it to try other source code samples for VBScript and VB6.

Try it today: Get 60 Day Free Trial or sign up for Web API

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

Try it today: Get 60 Day Free Trial or sign up for Web API

MORE INFORMATION

Get 60 Day Free Trial or Visit ByteScout PDF SDK page

Explore ByteScout PDF SDK documentation

WEB API VERSION

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next