TAILIEUCHUNG - PHP and MySQL Web Development - P151

PHP and MySQL Web Development - P151: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | 722 Chapter 30 Generating Personalized Documents in Portable Document Format PDF Generating a PDF Certificate from a Template The process of generating a PDF certificate from a template is very similar. The main difference is that when we create the PDF file some of our placeholders might be interspersed with formatting codes. For example if we look in the certificate template file we have created we can see that the placeholders now look like this N -13 AME -10 -6 Na -9 m 0 e -18 -11 1 sc -17 or -6 e -6 -11 -11 1 m -12 m 0 d -6 d -19 1 yy -13 yy -13 If you look through the file you will see that unlike RTF this is not a format that humans can easily read through. There are a few different ways we can deal with this. We could go through each of these placeholders and delete the formatting actually makes fairly little difference to how the document looks in the end as the codes embedded in the previous template indicate how much space should be left between the letters of the placeholders that we are going to replace anyhow. However if we take this approach we must go through and hand edit the PDF file and repeat this each time we change or update the file. This is not a big deal when dealing with only four placeholders but it becomes a nightmare when for example you have multiple documents with many placeholders and you decide to change the letterhead on all the documents. We can avoid this problem using a different can use Adobe Acrobat to create a PDF form similar to an HTML form with blank named fields. You can then use a PHP script to create what is called an FDF Forms Data Format file which is basically a set of data to be merged with a can create FDFs using PHP s FDF function library specifically the fdf_create function to create a file the fdf_set_value function to set the field values and the fdf_set_file function to set the associated template form can then pass this file back to the browser with the .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.