Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 278 lines (188 sloc) 8.655 kB
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
1 = unoconv(1)
2 Dag Wieers <dag@wieers.com>
d7c2061 @dagwieers - Support OpenOffice installations on Windows on drive-letters other …
authored
3 v0.4, 20 october 2010
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
4
5
6 == NAME
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
7 unoconv - convert any document from and to any LibreOffice supported format
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
8
9
10 == SYNOPSIS
11 'unoconv' [options] file [file2 ..]
12
1f71fec @dagwieers Add CSV import filter information
authored
13 'unoconv' --listener [--server SRV] [--port PRT] [--connection CON]
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
14
15
16 == DESCRIPTION
17 unoconv is a command line utility that can convert any file format that
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
18 LibreOffice can import, to any file format that LibreOffice is capable of
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
19 exporting.
20
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
21 unoconv uses the LibreOffice's UNO bindings for non-interactive conversion
b39d043 @vincentbernat Fix a typo in unoconv manual page.
vincentbernat authored
22 of documents and therefore needs an LibreOffice instance to communicate with.
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
23 Therefore if it cannot find one, it will start its own instance for temporary
24 usage. If desired, one can start a ``listener'' instance to use for subsequent
25 connections or even for remote connections.
26
27
28 == OPTIONS
29 -c, --connection::
30 UNO connection string to be used by the client to connect to an
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
31 LibreOffice instance, or used by the listener to make LibreOffice
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
32 listen.
33 +
34 Default connection string is "socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
35
36 -d, --doctype::
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
37 Specify the LibreOffice document type of the backend format. Possible
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
38 document types are: 'document', 'graphics', 'presentation',
39 'spreadsheet'.
40 +
41 Default document type is 'document'.
42
d7c2061 @dagwieers - Support OpenOffice installations on Windows on drive-letters other …
authored
43 -e, --export::
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
44 Set specific export filter options (related to the used LibreOffice filter).
d7c2061 @dagwieers - Support OpenOffice installations on Windows on drive-letters other …
authored
45 +
46 eg. for the PDF output filter one can specify: -e PageRange=1-2
1f71fec @dagwieers Add CSV import filter information
authored
47 +
48 See the *EXPORT FILTERS* section.
d7c2061 @dagwieers - Support OpenOffice installations on Windows on drive-letters other …
authored
49
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
50 -f, --format::
51 Specify the output format for the document. You can get a list of
43230be @dagwieers Improvements to documentation.
authored
52 possible output formats per document type by using the +--show+ option.
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
53 +
54 Default document type is 'pdf'.
55
d7c2061 @dagwieers - Support OpenOffice installations on Windows on drive-letters other …
authored
56 -i, --import::
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
57 Set specific import filters options (related to the used LibreOffice
1f71fec @dagwieers Add CSV import filter information
authored
58 import filter based on the input filename).
d7c2061 @dagwieers - Support OpenOffice installations on Windows on drive-letters other …
authored
59 +
1f71fec @dagwieers Add CSV import filter information
authored
60 See the *IMPORT FILTERS* section.
43230be @dagwieers Improvements to documentation.
authored
61
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
62 -l, --listener::
63 Start unoconv as listener for unoconv clients to connect to.
64
3e9711e @dagwieers - Improved -n / --no-launch documentation
authored
65 -n, --no-launch::
66 By default if no listener is running, unoconv will launch its own
67 (temporary) listener to make sure the conversion works. This option
68 will abort the conversion if no listener is found, rather than starting
69 our own listener.
70
9b3cf1b @dagwieers Change to how -o/--output/--outputpath works (can now output to filen…
authored
71 -o, --output::
72 If the argument is a directory, put the converted documents in this
73 directory. If multiple input files are provided, use it as a
74 basename (and add output extension). Otherwise use it as the
75 output filename.
43230be @dagwieers Improvements to documentation.
authored
76
d7c2061 @dagwieers - Support OpenOffice installations on Windows on drive-letters other …
authored
77 --pipe::
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
78 Use a pipe as an alternative connection mechanism to talk to LibreOffice.
d7c2061 @dagwieers - Support OpenOffice installations on Windows on drive-letters other …
authored
79
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
80 -p, --port::
81 Port to listen on (as listener) or to connect to (as client).
82 +
83 Default port is '2002'.
84
85 -s, --server::
86 Server (address) to listen on (as listener) or to connect to (as client).
87 +
88 Default server is 'localhost'.
89
6f3e1ac @dagwieers Added example document.
authored
90 --show::
91 List the possible output formats to be used with +-f+.
92
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
93 --stdout::
94 Print converted output file to stdout.
95
d7c2061 @dagwieers - Support OpenOffice installations on Windows on drive-letters other …
authored
96 -t, --template::
97 Specify the template to use for importing styles from. This can be very
98 useful if you have a corporate identity you have to apply to every
99 document you distribute.
100
101 -T, --timeout::
102 When unoconv starts its own listener, try to connect to it for an amount
103 of seconds before giving up. Increasing this may help when you receive
104 random errors caused by the listener not being ready to accept conversion
105 jobs.
106
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
107 -v, --verbose::
108 Be more and more and more verbose.
109
110
111 == ARGUMENTS
112 You can provide one or more *files* as arguments to convert each of them to
113 the specified *output format*.
114
115
1f71fec @dagwieers Add CSV import filter information
authored
116 == IMPORT FILTERS
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
117 Depending on the used input file, a different LibreOffice import filter is
1f71fec @dagwieers Add CSV import filter information
authored
118 automatically used by unoconv. This import filter can be influenced by the
119 +-i+ option that, depending on the filter used, accepts different arguments.
120
121 It is not always clear what import filter options you can provide, the import
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
122 dialog in LibreOffice for the filter you ar using might give a good indication
1f71fec @dagwieers Add CSV import filter information
authored
123 as to what you can expect as import filter options.
124
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
125 The reference is LibreOffice's documentation, for spreadsheets it is described at:
1f71fec @dagwieers Add CSV import filter information
authored
126 http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options
127 but we will look into some examples.
128
129
130 == DEFAULT IMPORT FILTER OPTIONS
131 The default import filter for many imports (eg. Lotus, dBase or DIF) accepts
132 as the only argument the input encoding-type, so if you require utf-8 you
133 can do:
134
135 -i utf-8
136
137 For a list of posible encoding types, you can use the above link to find the
138 possible options.
139
140
141 == CSV IMPORT FILTER OPTIONS
142 The CSV import filter accepts various arguments, the order is:
143 'separator(s),text-delimiter,encoding,first-row,column-format'
144
145 For example you might want to use this for a real comma-separated document:
146
147 -i 44,34,utf-8,2,1/5/2/1/3/1/4/1
148
149 which will use a comma (44) as the field separator, a double quote (34) as the
150 text delimiter, UTF-8 for the input encoding, start from the second row and
151 use the specified formats for each column (1 means standard, 5 means YY/MM/DD
152 date)
153
154 If you like to use more than one separator (say a space or a tab) and use the
155 system's encoding, but with no text-delimiter, you can do:
156
157 -i 9/32,,system,2
158
159
160 == EXPORT FILTERS
161 In contrast to import filters, export filters can have multiple named options,
162 although it is not always clear what options are available. It all depends on
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
163 the version of LibreOffice. The export dialog you get in LibreOffice might give
1f71fec @dagwieers Add CSV import filter information
authored
164 you a clue about what is possible, each of those widgets represents an option.
165
166
167 == PDF EXPORT FILTER OPTIONS
168 The PDF export filter is likely the most advanced export filter in its kind
169 with a myriad of options one can use. The export filter options are described
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
170 in a separate document, or on LibreOffice's wiki at:
1f71fec @dagwieers Add CSV import filter information
authored
171
172 http://wiki.services.openoffice.org/wiki/API/Tutorials/PDF_export
173
174 For example one can specify: +-e PageRange=1-2+
175
176
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
177 == EXAMPLES
178 You can use unoconv in standalone mode, this means that in absence of an
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
179 LibreOffice listener, it will starts its own:
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
180
181 unoconv -f pdf some-document.odt
182
183
184 One can use unoconv as a listener (by default localhost:2002) to let other
185 unoconv instances connect to it:
186
187 unoconv --listener &
188 unoconv -f pdf some-document.odt
189 unoconv -f doc other-document.odt
190 unoconv -f jpg some-image.png
191 unoconv -f xsl some-spreadsheet.csv
192 kill -15 %-
193
194
195 This also works on a remote host:
196
197 unoconv --listener --server 1.2.3.4 --port 4567
198
199
200 and then connect another system to convert documents:
201
202 unoconv --server 1.2.3.4 --port 4567
203
204
19962db @dagwieers - Fixed the problems related to swapping python binary
authored
205 == ENVIRONMENT VARIABLES
206 UNO_PATH::
207 specifies what LibreOffice pyuno installation unoconv needs to use
208 eg. _/opt/libreoffice3.4/basis-link/program_
209
210
2b5e585 @dagwieers - Add instructions on how to decipher the ErrCode
authored
211 == EXIT STATUS
212 Normally, the exit status is 0 if the conversion ran successful. If an error
213 has occured, the return code is most likely an error returned by LibreOffice
214 (or its interface, called UNO) however, the error never translates to something
215 meaningful. In case you like to decipher the LibreOffice errCode, look at:
216
217 http://cgit.freedesktop.org/libreoffice/core/tree/tools/inc/tools/errcode.hxx
218 http://cgit.freedesktop.org/libreoffice/core/tree/svtools/inc/svtools/sfxecode.hxx
219 http://cgit.freedesktop.org/libreoffice/core/tree/svtools/inc/svtools/soerr.hxx
220
221 Using the above lists, the error code 2074 means:
222
223 Class: 1 (ERRCODE_CLASS_ABORT)
224 Code: 26 (ERRCODE_IO_INVALIDPARAMETER or SVSTREAM_INVALID_PARAMETER)
225
226 And the error code 3088 means:
227
228 Class: 3 (ERRCODE_CLASS_NOTEXISTS)
229 Code: 16 (ERRCODE_IO_CANTWRITE)
230
19962db @dagwieers - Fixed the problems related to swapping python binary
authored
231
232 == SEE ALSO
233 convert(1), file(1), odt2txt
234
235
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
236 == BUGS
1e5976c @dagwieers - Replaced OpenOffice by LibreOffice in source code and documentation
authored
237 unoconv uses the UNO bindings to connect to LibreOffice, in absence of a usable
238 socket, it will start its own LibreOffice instance with the correct parameters.
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
239
240 [NOTE]
241 Please see the TODO file for known bugs and future plans.
242
243
244 == REFERENCES
245 unoconv is very useful together with the following tools:
246
247 Asciidoc::
248 http://www.methods.co.nz/asciidoc/
249
19962db @dagwieers - Fixed the problems related to swapping python binary
authored
250 asciidoc-odf::
251 http://github.com/dagwieers/asciidoc-odf
252
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
253 docbook2odf::
254 http://open.comsultia.com/docbook2odf/
255
d097de8 @dagwieers Updated manual and TODO
authored
256 A list of possible import and export formats is available from:
257
258 OpenOffice 2.1::
259 http://wiki.services.openoffice.org/wiki/Framework/Article/Filter/FilterList_OOo_2_1
260
261 OpenOffice 3.0::
262 http://wiki.services.openoffice.org/wiki/Framework/Article/Filter/FilterList_OOo_3_0
263
5f5b561 @dagwieers Version 0.3 preparations. Hold on tight.
authored
264
265 == AUTHOR
266 Written by Dag Wieers, <mailto:dag@wieers.com[]>
267
268
269 == RESOURCES
270 Main web site: http://dag.wieers.com/home-made/unoconv/[]
271
272
273 == COPYING
274 Copyright \(C) 2007 Dag Wieers. Free use of this software is granted under the
275 terms of the GNU General Public License (GPL).
276
277 // vim: set syntax=asciidoc
Something went wrong with that request. Please try again.