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!
VB6 code for using CopyPageRanges function |
Post Reply |
Author | |
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
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
---------------------------
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store