N
NudeDude
Guest
i try to create a PDF-File via wkhtmltopdf.exe in Progress4GL. I have written a procedure which downloads a html file as an INPUT.
It downloads the html file in this directory --> K:\K11\WEB\PDF\Name_01.03.2021_09.17.25_xx.html
wkthmltopdf.exe has 1 INPUT and 1 Output Directory. Structure looks like this in CMD Console --> :: [.exe] [INPUT DIRECTORY] [OUTPUT DIRECTORY]
if i run manually cmd console with these commands it works perfect
My Question is: How can i run .exe File with dynamic(Name depends on Date&Time) INPUT OUTPUT Variables in Progress ?
I found a command which runs .exe file in progress4GL
Thanks for any HELP <3
Continue reading...
Code:
procedure downloadhtml:
define input parameter i-benutzer as character no-undo.
define variable zw-path as character no-undo.
define variable h-uhrzeit as character no-undo.
define variable h-text as character no-undo.
h-uhrzeit = string(time, "HH:MM:SS").
h-uhrzeit = replace(h-uhrzeit, ":", ".").
h-text = '<div style="color:red;">I am a html file</div>'.
find table.field
where table.field.man = "xxx"
and table.field.krg = "X-2540.w"
and table.field.user = "_PPS"
and table.field.opzt = "_PPN"
no-lock no-error.
if available table.field then do:
zw-path = table.field2.
end.
OUTPUT TO VALUE(zw-path + "Name_" + string(today,"99.99.9999") + "_" + h-uhrzeit + "_" + i-benutzer + ".html").
put unformatted h-text skip.
output close.
end procedure.
It downloads the html file in this directory --> K:\K11\WEB\PDF\Name_01.03.2021_09.17.25_xx.html
wkthmltopdf.exe has 1 INPUT and 1 Output Directory. Structure looks like this in CMD Console --> :: [.exe] [INPUT DIRECTORY] [OUTPUT DIRECTORY]
if i run manually cmd console with these commands it works perfect
cd **C:\Program Files (x86)\wkhtmltopdf\ wkhtmltopdf.exe** **K:\K11\WEB\PDF\Name_01.03.2021_09.17.25_xx.html** **K:\K11\WEB\PDF\Name_01.03.2021_09.17.25_xx.pdf**
My Question is: How can i run .exe File with dynamic(Name depends on Date&Time) INPUT OUTPUT Variables in Progress ?
I found a command which runs .exe file in progress4GL
os-command(wkhtmltopdf.exe)
but how can i put input and output variables/directories in .exe file in progress4gl?Thanks for any HELP <3
Continue reading...