Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pdflib not properly installed?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mslinn
Apprentice
Apprentice


Joined: 24 Sep 2004
Posts: 206
Location: Half Moon Bay, CA

PostPosted: Sun Oct 12, 2008 1:48 am    Post subject: pdflib not properly installed? Reply with quote

I am running PHP 5.2.6-pl7-gentoo with:
Code:
eix pdflib
[I] dev-php5/pecl-pdflib
     Available versions:  (~)2.1.4 (~)2.1.5
     Installed versions:  2.1.5(18:26:10 10/11/08)
     Homepage:            http://pecl.php.net/pdflib
     Description:         PHP extension for creating PDF files.

[I] media-libs/pdflib
     Available versions:  (5)  6.0.3-r1 7.0.1 7.0.2 7.0.2_p8
        {cxx doc elibc_FreeBSD java perl python tcl}
     Installed versions:  7.0.2_p8(5)(18:14:11 10/11/08)(cxx perl python -doc -elibc_FreeBSD -java -tcl)
     Homepage:            http://www.pdflib.com/
     Description:         A library for generating PDF on the fly.

Here is a short test PHP page:
Code:
<?php
$pdf = pdf_new();
pdf_open_file($pdf, "/tmp/testX.pdf");
pdf_set_info($pdf, "Author", "Mike Slinn");
pdf_set_info($pdf, "Title", "Test for PHP wrapper of PDFlib 2.0");
pdf_set_info($pdf, "Creator", "See Author");
pdf_set_info($pdf, "Subject", "Testing");
pdf_begin_page($pdf, 595, 842);
#pdf_add_outline($pdf, "Page 1");
pdf_set_font($pdf, "Times-Roman", 30, "host");
pdf_set_value($pdf, "textrendering", 1);
pdf_show_xy($pdf, "Licensed to Fred Flintstone", 50, 750);
pdf_moveto($pdf, 50, 740);
pdf_lineto($pdf, 330, 740);
pdf_stroke($pdf);
pdf_end_page($pdf);
pdf_close($pdf);
pdf_delete($pdf);
echo "<a href=$pdf>finished</a>\n";
?>

Here is what I get when I run the page:
Code:
Fatal error: Call to undefined function pdf_set_font() in blah/blah/blah/pdflibtest.php on line 10

I looked at the output of phpinfo() and did not see any reference to pdflib:
Code:
'./configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--disable-bcmath' '--without-bz2' '--disable-calendar' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--disable-ftp' '--with-gettext' '--without-gmp' '--disable-hash' '--disable-ipv6' '--disable-json' '--without-kerberos' '--enable-mbstring' '--with-mcrypt' '--without-mhash' '--without-msql' '--without-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--disable-pdo' '--without-pgsql' '--disable-posix' '--with-pspell' '--without-recode' '--disable-simplexml' '--disable-shmop' '--without-snmp' '--disable-soap' '--disable-sockets' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--without-xmlrpc' '--without-xsl' '--disable-zip' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--with-db4' '--disable-flatfile' '--with-gdbm' '--disable-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-imap' '--with-imap-ssl' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--without-mysqli' '--with-readline' '--without-libedit' '--without-mm' '--without-sqlite' '--with-pic'

Assuming that is the problem, how do I fix that?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum