WPS Office is considered the main compatible operating system for its various tools and easy access. You can do things on your most reliable Office suite, WPS Office which includes tools that convert any pdf to OpenOffice. Use WPS Office to Convert PDF to OpenOffice File In this article, I am showing how some major converting tools for offline and online to convert PDF to OpenOffice easily. We need both the unique features that PDF and OpenOffice provide. It includes a word processor, a spreadsheet application, a presentation, and more. OpenOffice is considered the most compatible office suite for its operating file opening system. On the other hand, OpenOffice is used for editing and changing the content. The PDF file is excellent for sharing and file viewing options. Both used as input files two HTML files which were identical, apart from one line: it was the line which referenced a CSS file to be used for rendering the HTML.Converting PDF to OpenOffice is one of the professional working formats to utilize for different purposes. Here are two screenshots of results I achieved with this method. "number-up=4 page-border=double-thick number-up-layout=tblr" \ | /usr/libexec/cups/filter/cgpdftopdf 1 2 3 4 5 \ Let's try: /usr/libexec/cups/filter/xhtmltopdfcc 1 2 3 4 5 my.html \ Looking up the CUPS command line options on the CUPS web page suggests a few candidates: -o number-up=4ĭo look like they could be applied while doing a PDF-to-PDF transformation. That is, we need to come up with some settings in parameter no. However, piping the output of xhtmltopdf into cgpdftopdf is only interesting if we try to apply some "print options". | /usr/libexec/cups/filter/cgpdftopdf 1 2 3 4 "" \ So this should work: /usr/libexec/cups/filter/xhtmltopdf 1 2 3 4 5 my.html \ This additional filter expects the same sort of parameter number and orders, like all CUPS filters. While we are at it, we could try to apply some other CUPS print subsystem filters on the output: /usr/libexec/cups/filter/cgpdftopdf looks like one that could be interesting. Or, alternatively (this is faster to type and easier to check for completeness, using 5 dummy parameters instead of 5 empty ones): /usr/libexec/cups/filter/xhtmltopdf 1 2 3 4 5 my.html > my.pdf So, let's try it: /usr/libexec/cups/filter/xhtmltopdf "" "" "" "" "" my.html > my.pdf We also have to redirect the output to a PDF file. When we run it on the command line, we have to supply 5 dummy or empty parameters first, before we can put the input file's name. The only CLI params which are interesting to us are number 5 (the "options") and the (optional) number 6 (the input file name). If only 5 parameters are given, it reads its input from, otherwise from the 6ths parameter, a file name. The command requires in total at least 5, or an optional 6th parameter. Most of these parameter names show that the tool clearly related to printing. Usage: xhtmltopdf job-id user title copies options Calling it with no parameters at all (or with the wrong number of parameters) it will emit a small usage hint: $ /usr/libexec/cups/filter/xhtmltopdf The second thing to know is that it requires a specific syntax and order of parameters to run, otherwise it won't. It is in /usr/libexec/cups/filter/xhtmltopdf. The first thing to know is that it is not in any desktop user's $PATH.However, if you know about it, know where to find it and know how to run it, there is no problem with doing so: This filter is usually not meant to be used by end-users but only by the CUPS printing system. This method (ab)uses a filter from the Mac's print subsystem, called xhtmltopdf. It does not use LibreOffice at all and should work on all Macs. Ok, here is an alternative way to do convert (X)HTML to PDF on a Mac command line. I'm trying to convert a HTML file to a PDF by using the Mac terminal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |