PHP | How to merge multiple PDFs into single file using pdftk

| By Webner

Using PDFtk we can merge multiple files into a single file using a command like this: Example : pdftk file1 file2 output file3. Sample code to accomplish the same using PHP is given below: $arrayOfPDFFiles; $outputPDFName = “mergeResult.pdf”; $dir =”Files/GeneratedPDFs/”;

Moodle/Totara | Upgrade Moodle database after making changes to a plugin

| By Webner

In one of our Moodle projects, we modified a plugin’s code to add extra functionality to plugin. The modification in plugin’s code was not reflected and Moodle showed the older version of plugin. To solve this problem, we upgraded the

Eclipse | Undo deleted file in Eclipse

| By Webner

Problem: Undo deleted file in Eclipse Solution: We were working on a project in Eclipse. Accidentally one of the PHP files got deleted in which code was written. Eclipse does not use the Linux ‘Trash’ but keeps local history from where we

ACORD Forms autofill

| By Webner

We get this request from a lot of clients in US insurance industry who want to generate ACORD forms automatically, means they want data of corresponding insurance Policy and other objects filled automatically in the editable ACORD PDF. Most of

PHP – Get files modified on a particular date

| By Webner

Solution: In following example we have filtered files which are modified on current date (today’s date): $source= “C:\wamp\www\Files\”; $files = scandir($source); $archiveFiles = array(); foreach($files as $file) { if (!in_array($file,array(“.”,”..”))) { $lastModified = date(‘d/m/y’,filemtime($source . ‘/’ .$file)); IF($lastModified==date(“d/m/y”)) { array_push($archiveFiles, $file);