Print Page | Close Window

Using the ActiveX version with ASP

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: Sample Code
Forum Description: Share Debenu Quick PDF Library sample code with other forum members
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1209
Printed Date: 22 Nov 24 at 7:09PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Using the ActiveX version with ASP
Posted By: Rowan
Subject: Using the ActiveX version with ASP
Date Posted: 09 Sep 09 at 1:44AM
Download the http://www.quickpdflibrary.com/products/quickpdf/updates.php - latest version of Quick PDF Library from our website.

You must place this file in a directory where IIS has been setup with execute permission. For example Windows\System32 and IIS must be setup to execute ActiveX controls. If you have any difficulty with this, feel free to contact us for help. 

You need to register the ActiveX library with Windows, using the following command:

regsvr32 <path>\QuickPDFAX0715.dll

A message should appear indicating that the library has been successfully registered.

Type your first ASP script using Quick PDF Library:

<%
Dim QP
Set QP = Server.CreateObject("QuickPDFAX0715.PDFLibrary")
Call QP.UnlockKey("type your license key here")
Call QP.DrawText(100, 500, "Hello World!")
Call QP.SaveToFile(Server.MapPath("test.pdf"))
Set QP = Nothing
%>

Let's look at each part of the program. The first two commands create the Quick PDF Library object:

Dim QP
Set QP = Server.CreateObject("QuickPDFAX0715.PDFLibrary")

The next part unlocks the library. You must supply your license key to the UnlockKey function. If you have not purchased Quick PDF Library yet, the installer will contain a 30 day evaluation license key.

Call QP.UnlockKey("type your license key here")

Now the library is ready to use. We'll draw some text onto the page, and then save the PDF document to a file on disk:

Call QP.DrawText(100, 500, "Hello World!")
Call QP.SaveToFile(Server.MapPath("test.pdf"))

Finally, we should release the object to free the memory that it used:

Set QP = Nothing



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk