Command line pdf merge3/6/2023 ![]() Windows uses backslashes for file paths and the double backslash is needed for PHP as an escape character. Make sure to change the / to \\ for the file paths.The file name is gswin64c.exe at the time of this writing. Make sure to use the command line executeable in your Ghostscript installation's bin directory.exe file in your PHP script, make sure to create an environment variable to the correct path. Unless you want to define the whole path to the Ghostscript.Notes for Windows UsersĪ few items to note if you're running this script on a Windows machine: You can output the result stored in our $result variable with PHP's echo command. The result is the three PDF files defined in our $files array is now merged into a single PDF document named merged.pdf. PHP's shell_exec() method will invoke Ghostscript using the command we created, and generate the merged PDF file in the background into our pdf directory. = "2
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |