Html 使用模板转换LibreOffice命令行
我有一个小应用程序,可以使用soffice命令行将HTML文件转换为ODT。我想向转换添加一个模板 可能吗?Html 使用模板转换LibreOffice命令行,html,templates,command-line,libreoffice,odt,Html,Templates,Command Line,Libreoffice,Odt,我有一个小应用程序,可以使用soffice命令行将HTML文件转换为ODT。我想向转换添加一个模板 可能吗? 我试过使用-n template.ott(来自man libreoffice),但没有成功。template.ott是一个简单的模板,标题上有一个图像。否根据帮助,这是不可能的 libreoffice --help LibreOffice 4.2.7.2 420m0(Build:2) Usage: soffice [options] [documents...] Options: -
我试过使用
-n template.ott
(来自man libreoffice
),但没有成功。template.ott
是一个简单的模板,标题上有一个图像。否根据帮助,这是不可能的
libreoffice --help
LibreOffice 4.2.7.2 420m0(Build:2)
Usage: soffice [options] [documents...]
Options:
--minimized keep startup bitmap minimized.
--invisible no startup screen, no default document and no UI.
--norestore suppress restart/restore after fatal errors.
--quickstart starts the quickstart service
--nologo don't show startup screen.
--nolockcheck don't check for remote instances using the installation
--nodefault don't start with an empty document
--headless like invisible but no userinteraction at all.
--help/-h/-? show this message and exit.
--version display the version information.
--writer create new text document.
--calc create new spreadsheet document.
--draw create new drawing.
--impress create new presentation.
--base create new database.
--math create new formula.
--global create new global document.
--web create new HTML document.
-o open documents regardless whether they are templates or not.
-n always open documents as new files (use as template).
--display <display>
Specify X-Display to use in Unix/X11 versions.
-p <documents...>
print the specified documents on the default printer.
--pt <printer> <documents...>
print the specified documents on the specified printer.
--view <documents...>
open the specified documents in viewer-(readonly-)mode.
--show <presentation>
open the specified presentation and start it immediately
--accept=<accept-string>
Specify an UNO connect-string to create an UNO acceptor through which
other programs can connect to access the API
--unaccept=<accept-string>
Close an acceptor that was created with --accept=<accept-string>
Use --unnaccept=all to close all open acceptors
--infilter=<filter>
Force an input filter type if possible
Eg. --infilter="Calc Office Open XML"
--convert-to output_file_extension[:output_filter_name] [--outdir output_dir] files
Batch convert files.
If --outdir is not specified then current working dir is used as output_dir.
Eg. --convert-to pdf *.doc
--convert-to pdf:writer_pdf_Export --outdir /home/user *.doc
--print-to-file [-printer-name printer_name] [--outdir output_dir] files
Batch print files to file.
If --outdir is not specified then current working dir is used as output_dir.
Eg. --print-to-file *.doc
--print-to-file --printer-name nasty_lowres_printer --outdir /home/user *.doc
--pidfile file
Store soffice.bin pid to file.
Remaining arguments will be treated as filenames or URLs of documents to open.
libreoffice——帮助
LibreOffice 4.2.7.2 420m0(版本:2)
用法:办公楼[选项][文档…]
选项:
--最小化保持启动位图最小化。
--不可见无启动屏幕、无默认文档和无UI。
--norestore在出现致命错误后禁止重新启动/恢复。
--快速启动启动快速启动服务
--nologo不显示启动屏幕。
--nolockcheck不检查使用安装的远程实例
--nodefault不以空文档开头
--像无头一样看不见,但根本没有用户交互。
--help/-h/-?显示此消息并退出。
--版本显示版本信息。
--编写器创建新的文本文档。
--计算创建新的电子表格文档。
--绘制并创建新图形。
--创建新的演示文稿。
--创建新数据库。
--数学创造新的公式。
--全局创建新的全局文档。
--web创建新的HTML文档。
-o打开文档,无论它们是否为模板。
-n始终将文档作为新文件打开(用作模板)。
--展示
指定要在Unix/X11版本中使用的X-Display。
-p
在默认打印机上打印指定的文档。
--pt
在指定的打印机上打印指定的文档。
--看法
以查看器-(只读-)模式打开指定的文档。
--展示
打开指定的演示文稿并立即启动它
--接受=
指定一个UNO连接字符串以创建UNO接受器,通过该接受器
其他程序可以连接以访问API
--不可接受=
关闭用--accept创建的接受程序=
使用--unaccept=all关闭所有打开的接受程序
--填充物=
如果可能,强制输入过滤器类型
例如--infilter=“Calc Office Open XML”
--转换为输出\u文件\u扩展名[:输出\u过滤器\u名称][--outdir输出\u目录]文件
批量转换文件。
如果未指定--outdir,则当前工作目录将用作输出目录。
例如--转换为pdf*.doc
--转换为pdf:writer\u pdf\u导出--outdir/home/user*.doc
--打印到文件[-printer name printer\u name][-outdir output\u dir]文件
将文件批量打印到文件。
如果未指定--outdir,则当前工作目录将用作输出目录。
例如--打印到文件*.doc
--打印到文件--打印机名称\u lowres\u打印机--outdir/home/user*.doc
--pidfile文件
将soffice.bin pid存储到文件中。
其余参数将被视为要打开的文档的文件名或URL。