Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > Sample Code
  New Posts New Posts RSS Feed - VB6 code for using CopyPageRanges function
  FAQ FAQ  Forum Search   Register Register  Login Login

VB6 code for using CopyPageRanges function

 Post Reply Post Reply
Author
Message
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Topic: VB6 code for using CopyPageRanges function
    Posted: 20 Sep 09 at 11:27AM
Small snippet of VB6 code for using CopyPageRanges function:

---------------------------
Private Sub btnCopyPageRanges_Click() Dim ClassName Dim LicenseKey Dim FileName ClassName = "QuickPDFAX0716.PDFLibrary" LicenseKey = "..." 'SET YOUR LICENSE KEY HERE... FileName = "C:\Program Files\Quick PDF Library\Quick PDF Library 7.16 Reference Guide.pdf" Dim QP Dim Result Dim FromDocumentID Dim ToDocumentID Set QP = CreateObject(ClassName) Result = QP.UnlockKey(LicenseKey) If Result = 1 Then ' Load file to copy pages from Call QP.LoadFromFile(FileName) ' Get document ID of loaded file FromDocumentID = QP.SelectedDocument() ' Create new document to copy pages to and get document id ToDocumentID = QP.NewDocument() ' Select document to copy pages to Call QP.SelectDocument(ToDocumentID) ' Copy pages from the first document to the second document (which has already been selected) Call QP.CopyPageRanges(FromDocumentID, "10,15,18-20,25-35") ' Delete the first page in the new document as it is a blank page Call QP.DeletePages(1, 1) ' Save the (already selected) new document to disk Call QP.SaveToFile("C:\PagesCopied.pdf") Else MsgBox "Invalid license key. Please set your license key by editing this file." End If End Sub
---------------------------
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store