It works fine using Portable Firefox 3.0 with wine 1.0. (Here we see that Windows is better than Linux
.)
First, I configured Portable Firefox under Windows (command line print plugin, print options, ...)
Then...
After compiling Wine 1.0 (as a user, not as root), I created some_folder containing a .wine folder belonging to the webserver-user (it does not work, if .wine does not belong to the webserver-user!). In this .wine-folder there is my wine-configuration. In some_folder, there is also an .Xauthority containing just the word localhost.
Then you can use the following commands:
Code: Select all
exec("killall Xvfb");
exec("rm -f /tmp/.X42-lock");
exec("Xvfb -auth some_folder/.Xauthority :42 > /dev/null &");
exec('env DISPLAY=:42 HOME=some_folder /your/wine/path/wine z:/path_to_your_firefox/FirefoxPortable.exe -print http://some.site/something_to_print.html -printmode pdf -printfile "z:\\your\\path\\with\\double-backslashes\\your_file.pdf"');
exec("killall Xvfb");
If you find any bugs or have any ideas, please let me know.
TO_Webmaster