venturemc Posted November 5, 2009 Share Posted November 5, 2009 I've been fighting with trying to implement some PDF building functionality in a PHP script. After hours of searching around, I discovered that I need to use the PDFlib class rather than the old method. OK fine, I got a foothold on that issue, but cannot locate a reference to the library associated with the PDF class. Everything I've found so far (including the PHP manual) indicates that all the deprecated functions were converted into class functions and would workas they were, but I've already found that not to be true (the first one I tired had a different number of arguments). What I'm looking for is a list of the PDFlib functions, with arg requirements etc. I have the FPDF module installed in my sytem (came with the XAMPP) install, but would prefer to do this with "stock" PHP modules so that it is more portable. I'm running PHP 5.3.0 on Apache for Windows 1.7.2 Link to comment https://forums.phpfreaks.com/topic/180463-pdflib-issues/ Share on other sites More sharing options...
clay1 Posted November 6, 2009 Share Posted November 6, 2009 Isn't the PDFlib a commercial product that costs money and isn't stock with PHP? I use FPDF myself Link to comment https://forums.phpfreaks.com/topic/180463-pdflib-issues/#findComment-952220 Share on other sites More sharing options...
venturemc Posted November 6, 2009 Author Share Posted November 6, 2009 Whatever I have came with my XAMPP install. SOme fo different parts work, but I can't find refernces to figure out what the functions are to finish. I spent all day trying just to draw a line, Do you find that FPTD is portable? Do you work on just one server or do projects where you dont have control of the install? Thanks Link to comment https://forums.phpfreaks.com/topic/180463-pdflib-issues/#findComment-952259 Share on other sites More sharing options...
clay1 Posted November 6, 2009 Share Posted November 6, 2009 I'm getting kind of confused about what you are asking There are two different PHP to PDF scripts PDFLib FPDF which is sort of a free clone of PDFLib You had said you wanted to use built in php functions which I am not aware there are any Your install came with FPDF? There are tutorials and user submitted templates on the FPDF site which will help you get a grasp of how to use it. It's rather arcane otherwise I've used fpdf on two systems. A test server I setup, and a shared host. Neither required any special handling or changes. When I uploaded my script and the library to my site it worked 'out of the box' Link to comment https://forums.phpfreaks.com/topic/180463-pdflib-issues/#findComment-952385 Share on other sites More sharing options...
venturemc Posted November 6, 2009 Author Share Posted November 6, 2009 Sorry for the confusion. I'm not sure what is "extra" and what is included with PHP. Aside from the FPFD module, I've seen different references to PHP-PFD handling. One that is object oriented (much like FPFD) and a previous function based module. The early version had this type of syntax: $p= pfd_new; pdf_open_file($p,'filename.pdf'); pdf_begin_page($p, 595, 842); .... (put stuff on the page)... pdf_close($p); pdf_delete($p); I've seen examples that instruct to use "PDF" instead of "pdf" in the above example; kind of a second gen set of PDF library. The OOP "PDFlib" (PHP 5+) looks more like this (the code below is not necessarily correct, but representative): $p= new PDFlib; $p->open_document(595,842,""); $p->open_page(""); .... (put stuff on the page)... $p->end_page(""); $p->end_document(""); I've successfully opened documents using the PDFlib OOP style above, but have errors as I try to end or close the document. So I know I have the PDFlib somewhere in my sytem - where it is, I have no idea. Every PHP site in on the web has examples of the original PDF module , most withe notes regarding the deprication of some of the functions. I've seen the FPDF site and thier functions, but even that isn't complete. I can also look at the FPTF library in my system. I've seen snippets of the PDFlib OOP in my second example, but cannot locate a complete library of it's functionality. That's what I'm looking for. I've seen many recommendations for use of the FPTD module, but I'm just not sure it's become a "standard" (if there is any such thing as "standard" in PHP!) and prefer to use modules that are likely to be supported on most systems. Perhaps the FPTD is more standard than PDFlib at this point, but I suspect that PDFlib will become the "standard" in the near future. Perhps it's in my best interest to write my own "conversion" class so that any code is easily translated within one script. Link to comment https://forums.phpfreaks.com/topic/180463-pdflib-issues/#findComment-952650 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.