【发布时间】:2021-05-30 19:38:16
【问题描述】:
我尝试在 Progress4GL 中通过 wkhtmltopdf.exe 创建 PDF 文件。我写了一个程序,它下载一个 html 文件作为 INPUT。
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 database.table
where database.table.man = "xxx"
and database.table.krg = "X-2540.w"
and database.table.user = "_PPS"
and database.table.opzt = "_PPN"
no-lock no-error.
if available database.table then do:
zw-path = table.field.
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.
它将html文件下载到这个目录:
K:\K11\WEB\PDF\Name_01.03.2021_09.17.25_xx.html
wkthmltopdf.exe 有 1 个输入和 1 个输出目录。 CMD 控制台中的结构如下所示 --> :: [.exe] [INPUT DIRECTORY] [OUTPUT DIRECTORY]
如果我使用这些命令手动运行 cmd 控制台,它会完美运行
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
我的问题是:如何运行具有动态(名称取决于日期和时间)INPUT OUTPUT 变量的 .exe 文件?
我发现了一个在progress4GL中运行.exe文件的命令
os-command(wkhtmltopdf.exe)
但是如何将输入和输出变量/目录放入 .exe 文件 in progress4gl?
【问题讨论】:
标签: batch-file exe wkhtmltopdf openedge progress-4gl