473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

PDFlib

I asked my web hosting company to install PDFlib so that I could
create, just very simple dynamic pdfs. (using PHP5)

They said it is installed. When I call phpinfo(), I see this [which
shows PDFlib as being installed].

Configure Command './configure'
'--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local'
'--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl'
'--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-ftp'
'--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr'
'--with-xpm-dir=/usr/X11R6' '--with-iconv'
'--with-imap=/usr/local/imap-2004g' '--with-mcrypt'
'--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr'
'--with-openssl' '--enable-discard-path' '--with-pdflib' '--with-pear'
'--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--with-ttf'
'--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-zip'
'--with-zlib'

I then get this error each time i try and create the PDF.
Fatal error: Class 'PDFlib' not found in
/home/username/public_html/make_pdf.php on line 9

I have looked everywhere and it seems like I am the only one to get
this error.
Anyone have thoughts or details that may shed light? - thanks

FYI: here is the example that throws the error.
<?php
try
{
$p = new PDFlib();

// open new PDF file; insert a file name to create the PDF on disk
if ($p->begin_document("", "") == 0) {
die("Error: " . $p->get_errmsg());
}

$p->set_info("Creator", "make_pdf.php");
$p->set_info("Author", "Me!!!");
$p->set_info("Title", "Hello world (PHP)!");

$p->begin_page_ext(595, 842, "");

$font = $p->load_font("Helvetica-Bold", "winansi", "");

$p->setfont($font, 24.0);
$p->set_text_pos(50, 700);
$p->show("Hello world!");
$p->continue_text("(says PHP)");
$p->end_page_ext("");

$p->end_document("");

$buf = $p->get_buffer();
$len = strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=hello.pdf");
print $buf;
}
catch (PDFlibException $e)
{
die("PDFlib exception occurred in hello sample:\n" .
"[" . $e->get_errnum() . "] " . $e->get_apiname() . ": " .
$e->get_errmsg() . "\n");
}
catch (Exception $e)
{
die($e);
}
$p = 0;
?>

Dec 12 '06 #1
0 3732

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Randell D. | last post by:
Folks, I've read the PHP online help file and I believe the ClibPDF functionality is seperate, but similar to the PDFlib version - What is the difference? Why would one use one, instead of the...
2
by: bonehead | last post by:
Greetings, Apologies in advance for the crosspost. I would like to determine if the PDFlib library has been installed on a shared server which I do not administer. Is there a command I can run...
0
by: William Holroyd | last post by:
So I've got PHP to recognize mcrypt and pdflib in the phpinfo() output, but trying to use any of the functions fail with "...undefined function called..". There aren't any configurable files with...
0
by: ian douglas | last post by:
Hey all, Anyone have a wraper written as a drop-in replacement for PDFlib? That is, use their function names, parameters, pretty much identically? I'm making some slight modifications to an...
0
by: acorn71 | last post by:
Hello, Are there advantages to using PDFlib over FPDF? My employer has purchased a license to PDFlib but I wanted to know if FPDF is a better overall choice. I'm specifically referring to any...
0
by: Rul | last post by:
i have to build pdf files from tiff in a visual basic application, so i downloaded http://download.devparadise.com/pdflib-2.01.zip pdflib's 2.01 source to make the visual basic bind, but the vb...
2
by: Nader Emami | last post by:
L.S., Would somebody help me about PDFlib using? I am a user of a Linux machine (not root) and I have installed PDFlib somewhere in my home directory. So I can't change the '/etc/php.ini' file....
0
by: seth.northrop | last post by:
Hi, I get this error with the new PHP PDF Binaries: http://pecl.php.net/bugs/bug.php?id=9491&edit=1 And I've attempted to do the workaround (install a newer PDFLib binary). That fixes the...
1
by: sanjeev1984chadha | last post by:
Hi I am facing trouble in calling PDFlib class i have a file called "export.php"and while running it from command prompt i get an error Fatal error: Class 'PDFlib' not found in...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.