Page 1 of 1
Anyone used PDFlib before?
Posted: Fri Jul 15, 2005 11:57 am
by Jr
I just downloaded PDFlib to use with PHP4 and I can't seem to figure out how to get it to work. Do I need to install it on the server or something? I just don't exactly get what I'm supposed to do.
Thanks,
Jr-
Posted: Fri Jul 15, 2005 12:23 pm
by onion2k
If you're making PDF files from scratch you'll find FPDF is considerably easier and doesn't require any server configuration.. it's pure PHP.
Posted: Fri Jul 15, 2005 12:46 pm
by wwwapu
FPDF actually works. This is great, I've been looking for something like this also.
With PHP 5 just change all
var to
private in fpdf.php
Private properties section or you could get
Code: Select all
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers
I have not looked it through well enough to say if something else should be changed.
Posted: Fri Jul 15, 2005 2:30 pm
by Jr
make a PDF from scratch in PHP? Isn't that new to PHP5 stuff? If not, then that's actually what I want to do.
Posted: Fri Jul 15, 2005 2:38 pm
by onion2k
Jr wrote:make a PDF from scratch in PHP? Isn't that new to PHP5 stuff? If not, then that's actually what I want to do.
http://www.fpdf.org/
Click the "Wordsearch" link in my signature for an example of it in use. Running on PHP 4.3.
Or click here:
http://ooer.com/wordsearch/digicams/digicams.pdf
Posted: Fri Jul 15, 2005 3:03 pm
by Jr
Isn't there a way to do it without any of those things I would need to install?
Posted: Fri Jul 15, 2005 3:23 pm
by pickle
PDFLib needs to be compiled into PHP in order to make PDFs without wordmarks. FPDF seems to be a pretty common tool (as you've probably surmised from the comments).
Posted: Fri Jul 15, 2005 4:00 pm
by onion2k
Jr wrote:Isn't there a way to do it without any of those things I would need to install?
FPDF isn't installed. It's just a PHP file you include with the include() function.
Posted: Fri Jul 15, 2005 4:13 pm
by Jr
So I downloaded it... Do I just upload the files and require() them as needed to use the PDF functions?
Posted: Fri Jul 15, 2005 5:22 pm
by nielsene
My preferred method s to have PHP write LaTeX and then exec pdflatex, but then again, I love the control I can get from LaTeX. I've been pleasantly surprised that all hosters I've been with had had pdflatex/latex installed.... This method is not for everyone, but it can avoid the hassles of some of the other libraries if you already know LaTeX/TeX
Posted: Sat Jul 16, 2005 2:45 am
by onion2k
Jr wrote:So I downloaded it... Do I just upload the files and require() them as needed to use the PDF functions?
You read the tutorial that comes with it.