Please can someone help on how to add a random text into a strategic location in an existing PDF file using PHP? I am using the rand() function to generate the random text/code.
Thanks
Please can someone help on how to add a random text into a strategic location in an existing PDF file using PHP? I am using the rand() function to generate the random text/code.
Thanks
With this code you will get 32 character random string on each attempt.
$strRandom = md5(microtime());
you can not just insert text into an existing pdf, you need to generate a new pdf for example with phps integrated pdf functions or one of the free available pdf libraries.
ie. PDFlib, wktmltopdf, zendpdf
There are pdf parsers for PHP from what I understand. Check this out Is there a PDF parser for PHP?
Bill Karwin said:
Zend_Pdf is part of the Zend Framework. Their manual states:
The Zend_Pdf component is a PDF (Portable Document Format) manipulation engine. It can load, create, modify and save documents. Thus it can help any PHP application dynamically create PDF documents by modifying existing documents or generating new ones from scratch.