tailieunhanh - Phát triển web với PHP và MySQL - p 80

Generating Personalized Documents in Portable Document Format (PDF) CHAPTER 30 765 FIGURE generates a certificate from an PDF template. One problem with this approach is that the code runs quite slowly because of the regular expression matching required. Regular expressions run much more slowly than str_replace() that we could use for the RTF version. If you are going to match a large number of placeholders or try to generate many of these documents on the same server, you might want look at other approaches. This would be less of a problem for a simpler template. Much of the bulk in this file is. | 765 Generating Personalized Documents in Portable Document Format PDF Chapter 30 Figure generates a certificate from an PDF template. One problem with this approach is that the code runs quite slowly because of the regular expression matching required. Regular expressions run much more slowly than str_replace that we could use for the RTF version. If you are going to match a large number of placeholders or try to generate many of these documents on the same server you might want look at other approaches. This would be less of a problem for a simpler template. Much of the bulk in this file is data representing the images. Generating a PDF Document Using PDFlib PDFlib is intended for generating dynamic PDF documents via the Web. It is not strictly part of PHP but rather a separate library with a large number of functions intended to be called from a wide variety of programming languages. Language bindings are available for C C Java Perl Python Tcl and ActiveX COM. Interestingly there is not an official PDFlib PHP binding available yet. The current binding is not documented or supported by PDFlib. The PDFlib Web site states Other language bindings such as PHP will be supported in the future but it has said this for at least a year. 30 Generating Personalized Documents in pdf 766 Building Practical PHP and MySQL Projects Part V Although it is possible that the official PHP binding might be better then the current one when or if it arrives the current one is very good. The only problem is that you need to read the PHP documentation available at http manual for an overview installation instructions and the PDFlib documentation available as the file in the PDFlib distribution for a detailed reference on the API. A Hello World Script for PDFlib After you have PHP and installed it with PDFlib enabled you can test it with a simple program such as the Hello World example in Listing . Listing Classic .

TỪ KHÓA LIÊN QUAN