Print Page | Close Window

PHP sample code

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=1079
Printed Date: 19 Apr 24 at 4:54AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: PHP sample code
Posted By: Rowan
Subject: PHP sample code
Date Posted: 06 May 09 at 8:20PM
Some basic PHP code that might be useful for anyone who wants to use Quick PDF Library with PHP. Full instructions on how to get setup with PHP and Quick PDF can be http://www.quickpdflibrary.com/blog/2009/05/pdf-web-apps-with-quick-pdf-library-and-php/ - found here .

<?php
$fileName = “DrawText.pdf”;
$qp = new COM(”QuickPDFAX0713.PDFLibrary”);
$validKey = $qp->UnlockKey(”…”);
if ($validKey == 1)
{
    echo “License validation successful!”;
    echo “<br />”;
    echo “Valid license key: “;
    echo $qp->LicenseInfo;
    echo “<br />”;
}
else
{
    echo “License validation failed!”;
    echo “<br /><br />”;
}
$qp->DrawText(100, 500, “Hello World!”);
$result = $qp->SaveToFile($fileName);
if ($result == 1)
{
    echo “File was successfully saved to disk.”;
    echo “<br /><br />”;
}
else
{
    echo “File could not be saved to disk.”;
    echo “<br /><br />”;
}
$qp = null;
?>



Replies:
Posted By: panner
Date Posted: 14 Dec 14 at 1:12AM
Hi Rowan

I know it's been awhile since you posted this code example.. Has the Quick Basic Library changed in how this could be done. I've tried your example in XAMPP and I can't get the code to run.

It stops and the error code says it can't locate the Quick PDF Library DLL "Fatal error: Class 'COM' not found in C:\xampp\htdocs\QBpdf\index.php on line 7"

I've registered the DLL's and entered my "key" and I've tried this with two dlls -- QuickPDFAX0815.dll and DebenuPDFLibraryAX0911.dll

Any help or guidance would help....

Ron



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