note 8173 deleted from ref.cpdf by jimw

From: Date: Sat, 08 Dec 2001 22:25:51 +0000
Subject: note 8173 deleted from ref.cpdf by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22304@lists.php.net to get a copy of this message
Regarding example 1 Script does run without PHP error, but the PDF generated/outputted isn't in a valid format. (At least for Adobe PDF reader 3.0 and 4.0 for Windows 98 that I use with MSIE 5.0) You will see this problem when you run the script, in my case I got to see the file-output in my browser in stead of seeing a document in Acrobat reader. If you change the script to generate a PDF you will get an error from the PDF reader when trying to open the document So be careful when using this as a first time test script. I think that the problem is related to a small piece of text which is placed in the PDF document but which is to big to fit on the page.. I will try to make a better example when I have had time start experimenting with ClibPDF The clock example works without a problem. (Good starter!!) Some other pitfalls I found: (For the unix users) When you have compiled the ClibPDF package (This is done by copying the correct Makefile.Operatingsystem to Makefile and running Make.) and you want to run 'Make Install' then first take a quick look if the directory 'include' exists in /usr/local (in other words: /usr/local/include) should exits. If this isn't the case create the directory. If you don't do this, the clib library which PHP needs isn't copied into the directory include, but copied as a file with the filename 'include'.. Then PHP can't find it, won't compile etc etc and like me it will take hours before you find out what the problem was.. (I had this problem on various Linux Redhat machines (version 6.2 was installed) After this you should be able to compile php with the ./configure --with-cpdflib support.. Another Pitfall/problem I have had is that I use a somewhat unknown server with the name WN-server. (www.wnserver.org). It has some advantages over Apache with feautures like security and flexibility when using CGI scripts.. What I have had with this server is the following: 192.168.0.20 [30/Aug/2000:07:53:19 +0200] "GET /david.php3 HTTP/1.1" 200 28863 <(13616/2) Client broke connection: transaction><contype> <> <> <> I haven't yet looked what this may be, but I get an empty page back when trying to load my analog clock generator script. This isn't a issue with Apache, but maybe with some other Web-servers this can also happen. I never had any problem with this server, so I am not sure how much I can blame ClibPDF for this.. To end this I have included my software versions I used with the above examples: PHP -> PHP 4.0.0 + ClibPDF 2.x also tried PHP 3.1.x + ClibPDF 1.1.x WN server. 1.1.9 Redhat 6.2 Apache 1.3.x Hope this may help anyone It looks like that the installtion of these LIBS are more work than learning how to use them.. :-( I didn't take a look at the free PDF lib but seeing all the comments that one looks even harder to install.

« previous php.notes (#22304) next »