Converting docx to PDF/A with libre office writer

与世无争的帅哥 提交于 2021-01-24 07:48:07

问题


I am happily converting docx files to PDF via the command line (controlled via C# process calls) out of my service.

Unfortunately I could not find any internet search results on how to set the options for the output PDF that the GUI offers me. I am specifically looking for generating PDF/A and tagged PDF via the command line.

Anyone ever done this and knows how to do that?

EDIT: Obviously getting a PDF/A can be done by using unoconv instead. On windows one would use the following command line in a checked out unoconv repository:

python.exe .\unoconv -f pdf -eSelectPdfVersion=1 C:\temp\libre\renderingtest.docx

I did not find further information on how to select other things (tagged PDF etc.) and where to get a complete list of the options that are available.

EDIT: It seems as one could try the different options in the GUI. The settings get saved to C:\Users\<userName>\AppData\Roaming\LibreOffice\4\user\registrymodifications.xcu. Then one can look up the changed setting and provide that to unoconv as this:

python.exe .\unoconv -f pdf -eUseTaggedPDF=1 -eSelectPdfVersion=1 C:\temp\libre\renderingtest.docx

Still not sure if I am doing this correctly though.

来源:https://stackoverflow.com/questions/62535317/converting-docx-to-pdf-a-with-libre-office-writer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!