We have this running well on a IBM Domino 9.0.1 Windows server, but when moved to Linux (Domino 9.0.1, on Linux 4.15.0-43-generic #46-Ubuntu SMP Th) the process fails. We convert html files to PDF to send to users. Windows, in short, works by calling:
sCmd = {C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe c:\TempPDF\22D6\temp.html c:\TempPDF\22D6\PPE00003.pdf}
taskId = Shellid(sCmd)
On Linux:
sCmd = {/usr/local/bin/wkhtmltopdf /DATA/temp/22D6/temp.html /DATA/temp/22D6/PPE00003.pdf}
taskId = Shellid(sCmd)
We have verified wkhtmltopdf works; running /usr/local/bin/wkhtmltopdf /DATA/temp/22D6/temp.html /DATA/temp/22D6/PPE00003.pdf on Linux box works, just does not work when called from the Notes Lotusscript agent (by ShellID).
UPDATE: @TorstenLink Seems this is a issue with wkhtmltopdf, when called by a scripting service - php or Ruby (see also: link. It will NOT load local files.
For interest Running as Agent script the logs show:
AMgr: Agent ('email PDF' in 'fastworks/Live/PDFPrint.nsf') printing: CMD:/usr/local/bin/wkhtmltopdf --header-left "Printed by LinuxDev [date] [time]" --header-right "Page [page] of [toPage]" "file:///home/notes/Documents/PDFTemp/3496/temp.html" /home/notes/Documents/PDFTemp/3496/LONACC00013.pdf
Loading pages (1/6)
Error: Failed to load http:/, with network status code 3 and http status code 0 - Host not found
Error: Failed loading page http: (sometimes it will work just to ignore this error with --load-error-handling ignore)
Error: Failed to load http://by/, with network status code 3 and http status code 0 - Host by not found
Error: Failed loading page http://by (sometimes it will work just to ignore this error with --load-error-handling ignore)
Error: Failed to load http://of/, with network status code 3 and http status code 0 - Host of not found
Error: Failed loading page http://of (sometimes it will work just to ignore this error with --load-error-handling ignore)
Error: Failed to load http://linuxdev/, with network status code 3 and http status code 0 - Host linuxdev not found
Error: Failed loading page http://linuxdev (sometimes it will work just to ignore this error with --load-error-handling ignore)
Error: Failed to load http://home/notes/Documents/PDFTemp/3496/temp.html", with network status code 3 and http status code 0 - Host home not found
Error: Failed loading page http:///home/notes/Documents/PDFTemp/3496/temp.html" (sometimes it will work just to ignore this error with --load-error-handling ignore)
Exit with code 1 due to network error: HostNotFoundErro
r
but if run the same command in a Terminal Window it works (logged in as notes). Cannot understand how the code knows to change what it looks for.
So now I am putting the html files into the local (domino) http server and reading them from there (so my source will be http://127.0.0.1/PDFTemp/3496/temp.html)!! Not the nicest of solutions but works.