提交 94ef3b4e authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Try old way of PDF generation first

上级 7cdecfd5
......@@ -369,23 +369,20 @@ public class Build extends BuildBase {
delete(files("bin").keep("*.jar"));
jar();
docs();
boolean pdfReady = false;
try {
if (exec("soffice", args("--convert-to", "pdf", "--outdir", "docs/html", "docs/html/onePage.html")) == 0) {
File f = new File("docs/html/onePage.pdf");
if (f.exists() && f.renameTo(new File("docs/h2.pdf"))) {
pdfReady = true;
}
}
} catch (Exception ex) {
}
if (!pdfReady) {
// Old way
exec("soffice", args("-invisible", "macro:///Standard.Module1.H2Pdf"));
copy("docs", files("../h2web/h2.pdf"), "../h2web");
} catch (Exception e) {
print("OpenOffice is not available: " + e);
try {
exec("soffice", args("-invisible", "macro:///Standard.Module1.H2Pdf"));
copy("docs", files("../h2web/h2.pdf"), "../h2web");
} catch (Exception e) {
print("OpenOffice is not available: " + e);
if (exec("soffice", args("--convert-to", "pdf", "--outdir", "docs/html",
"docs/html/onePage.html")) == 0) {
File f = new File("docs/html/onePage.pdf");
if (f.exists()) {
f.renameTo(new File("docs/h2.pdf"));
}
}
} catch (Exception ex) {
}
}
delete("docs/html/onePage.html");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论