forked from cognidox/OfficeToPDF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDocumentation.html
268 lines (268 loc) · 11.6 KB
/
Documentation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<div class="wikidoc">
<h1>Giving back to the community</h1>
<hr>
<p>Cognidox <a href="https://www.cognidox.com/">https://www.cognidox.com/</a> would not exist without the help of many open source projects. Perl, Apache and Solr are just a few of the excellent open source packages that help make CogniDox a leading document
management system. So, to show our appreciation, we've released a couple of open source projects such as OfficeToPDF to help others.</p>
<p>You can see all of our open source projects on <a title="Cognidox Opensource" href="https://www.cognidox.com/products/open-source/" target="_blank">
https://www.cognidox.com/products/open-source/</a>.</p>
<h2>OfficeToPDF - what does it do?</h2>
<hr>
<p>OfficeToPDF is a <strong>command line utility</strong> that converts Microsoft Office 2003, 2007, 2010, 2013 and 2016 documents from their native format into PDF using Office's in-built PDF export features.</p>
<p>Most Office to PDF converter tools are intended as single-user desktop applications. OfficeToPDF is useful (and unique) if you want to automatically create PDF files on a server-wide basis and free individual users from an extra step of using the "Save as..."
command on their Office files. These PDF files can then be stored and managed on a separate server. This can be useful if, for example, a department has a policy of only distributing PDF versions of documents to people outside the department.<br>
<br>
There are some technical requirements that must be met before you can use it:</p>
<ul>
<li>.NET Framework 4 </li><li>Office 2016, 2013, 2010 <strong>or </strong>Office 2007 </li></ul>
<p>If you are using Office 2007, you will also need:</p>
<ul>
<li>Visual Studio 2010 Tools for Office Runtime [<a href="https://www.microsoft.com/en-GB/download/details.aspx?id=48217" target="_blank">Download</a>]
</li><li>2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS [<a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=4d951911-3e7e-4ae6-b059-a2e79ed87041&displaylang=en" target="_blank">Download</a>]
</li></ul>
<p>It is distributed under the <a href="https://raw.githubusercontent.com/cognidox/OfficeToPDF/master/LICENSE.md">
<strong>Apache 2.0</strong> license</a>.</p>
<h2>Supported File Types</h2>
<hr>
<p>The following file types can be converted:</p>
<ul>
<li>Word (.doc, .dot, .docx, .dotx, .docm, .dotm, .rtf, .wpd) </li><li>Excel (.xls, .xlsx, .xlsm, .xlsb, .xlt, .xltx, .xltm, .csv) </li><li>Powerpoint (.ppt, .pptx, .pptm, .pps, .ppsx, .ppsm, .pot, .potx, .potm) </li><li>Visio (.vsd, .vsdx, .vsdm, .svg) [Requires >= Visio 2013 for .svg, .vsdx and .vsdm support]
</li><li>Publisher (.pub) </li><li>Outlook (.msg, .vcf, .ics) </li><li>Project (.mpp) [Requires Project >= 2010 for .mpp support] </li><li>OpenOffice (.odt, .odp, .ods) </li></ul>
<p>Conversion of Visio, Publisher and Project files require that the Visio, Publisher and Project applications are installed. These are not included in the Office standard package.</p>
<h2>Instructions</h2>
<hr>
<p>More information about installation and usage can be found on the Cognidox project page:
<a title="OfficeToPDF CogniDox" href="https://www.cognidox.com/officetopdf-converter/" target="_blank">
https://www.cognidox.com/officetopdf-converter/</a></p>
<p>In order to use the tool, download the officetopdf.exe file and, from the command line, run officetopdf.exe with two arguments - the source Office document and the destination PDF document. e.g.</p>
<pre><span style="color:#808080">Microsoft Windows [Version 6.1.7601]</span><br><span style="color:#808080">Copyright (c) 2009 Microsoft Corporation. All rights reserved.<br><br></span>C:\Users\test> <strong>officetopdf.exe <em>somefile.docx somefile.pdf</em></strong></pre>
<h3>Command line switches</h3>
<p>The following optional switches can be used:</p>
<table width="581" style="height:147px; width:581px">
<tbody>
<tr>
<td>/bookmarks</td>
<td>create bookmarks in the PDF when they are supported by the Office application</td>
</tr>
<tr>
<td>/readonly</td>
<td>attempts to open the source document in read-only mode</td>
</tr>
<tr>
<td>/print</td>
<td>create high-quality PDFs optimised for print</td>
</tr>
<tr>
<td>/hidden</td>
<td>attempts to minimise the Office application when converting</td>
</tr>
<tr>
<td>/template <em><template></em></td>
<td>use a .dot, .dotx or .dotm template when converting with Word</td>
</tr>
<tr>
<td>/markup</td>
<td>show document markup when creating PDFs with Word</td>
</tr>
<tr>
<td>/pdfa</td>
<td>produce ISO 19005-1 (PDF/A) compliant PDFs</td>
</tr>
<tr>
<td>/noquit</td>
<td>do not exit running Office applications</td>
</tr>
<tr>
<td>/excludeprops</td>
<td>do not include properties in generated PDF</td>
</tr>
<tr>
<td>/excludetags</td>
<td>do not include tags in generated PDF</td>
</tr>
<tr>
<td>/password</td>
<td>provide a read password to open the file with</td>
</tr>
<tr>
<td>/writepassword</td>
<td>provide a read/write password to open the file with</td>
</tr>
<tr>
<td>/merge</td>
<td>when using a template, create a new file from the template and merge the text from the document to convert into the new file</td>
</tr>
<tr>
<td>/excel_show_formulas</td>
<td>show formulas in Excel</td>
</tr>
<tr>
<td>/excel_show_headings</td>
<td>shows column and row headings</td>
</tr>
<tr>
<td>/excel_max_rows <em><rows></em></td>
<td>allow a limit on the number of rows to convert</td>
</tr>
<tr>
<td>/excel_active_sheet</td>
<td>only convert the currently active worksheet in a spreadsheet</td>
</tr>
<tr>
<td>/excel_worksheet <em><num></em></td>
<td>only convert worksheet <em><num></em> in the workbook. First sheet is 1</td>
</tr>
<tr>
<td>/excel_auto_macros</td>
<td>run Auto_Open macros in Excel files before conversion</td>
</tr>
<tr>
<td>/excel_no_link_update</td>
<td>do not update links when opening Excel files</td>
</tr>
<tr>
<td>/excel_no_recalculate</td>
<td>skip automatic re-calculation of formulas in the workbook</td>
</tr>
<tr>
<td>/word_header_dist <em><pts></em></td>
<td>the distance (in points) from the header to the top of the page</td>
</tr>
<tr>
<td>/word_footer_dist <em><pts></em></td>
<td>the distance (in points) from the footer to the bottom of the page</td>
</tr>
<tr>
<td>/word_field_quick_update</td>
<td>perform a fast update of fields in Word before conversion</td>
</tr>
<tr>
<td>/word_keep_history</td>
<td>do not clear Word's recent files list</td>
</tr>
<tr>
<td>/word_max_pages <em><pages></em></td>
<td>do not attempt conversion of a Word document if it has more than this number of
<em><pages></em></td>
</tr>
<tr>
<td>/word_no_field_update</td>
<td>do not update fields when creating the PDF</td>
</tr>
<tr>
<td>/word_ref_fonts</td>
<td>when fonts are not available, a reference to the font is used in the generated PDF rather than a bitmapped version. The default is for a bitmap of the text to be used</td>
</tr>
<tr>
<td>/pdf_clean_meta <em><type></em></td>
<td>allows for some meta-data to be removed from the generated PDF.<br>
<em><type></em> can be:
<ul>
<li>basic - removes author, keywords, creator and subject </li><li>full - removes all that basic removes and also the title </li></ul>
</td>
</tr>
<tr>
<td>/pdf_layout <em><layout></em></td>
<td>controls how the pages layout in Acrobat Reader.<br>
<em><layout></em> can be one of the following values:
<ul>
<li>onecol - show pages as a single scrolling column </li><li>single - show pages one at a time </li><li>twocolleft - show pages in two columns, with odd-numbered pages on the left </li><li> twocolright - show pages in two columns, with odd-numbered pages on the right
</li><li>twopageleft - show pages two at a time, with odd-numbered pages on the left </li><li>twopageright - show pages two at a time, with odd-numbered pages on the right
</li></ul>
</td>
</tr>
<tr>
<td>/pdf_page_mode <em><mode></em></td>
<td>controls how the PDF will open with Acrobat Reader.<br>
<em><mode></em> can be one of the following values:
<ul>
<li>full - the PDF will open in fullscreen mode </li><li>bookmarks - the PDF will open with the bookmarks visible </li><li>thumbs - the PDF will open with the thumbnail view visible </li><li>none - the PDF will open without the navigation bar visible </li></ul>
</td>
</tr>
<tr>
<td>/pdf_append</td>
<td>append the generated PDF to the end of the PDF destination</td>
</tr>
<tr>
<td>/pdf_prepend</td>
<td>prepend the generated PDF to the start of the PDF destination</td>
</tr>
<tr>
<td>/pdf_owner_pass <em><pass></em></td>
<td>set the owner password on the PDF. Needed to make modifications to the PDF</td>
</tr>
<tr>
<td>/pdf_user_pass <em><pass></em></td>
<td>set the user password on the PDF. Needed to open the PDF</td>
</tr>
<tr>
<td>/pdf_restrict_accessibility_extraction</td>
<td>Prevent all content extraction without the owner password</td>
</tr>
<tr>
<td>/pdf_restrict_annotation</td>
<td>prevent annotations on the PDF without the owner password</td>
</tr>
<tr>
<td>/pdf_restrict_assembly</td>
<td>prevent rotation, removal or insertion of pages without the owner password</td>
</tr>
<tr>
<td>/pdf_restrict_extraction</td>
<td>prevent content extraction without the owner password</td>
</tr>
<tr>
<td>/pdf_restrict_forms</td>
<td>prevent form entry without the owner password</td>
</tr>
<tr>
<td>/pdf_restrict_full_quality</td>
<td>prevent full quality printing without the owner password</td>
</tr>
<tr>
<td>/pdf_restrict_modify</td>
<td>prevent modification without the owner password</td>
</tr>
<tr>
<td>/pdf_restrict_print</td>
<td>prevent printing without the owner password</td>
</tr>
<tr>
<td>/verbose</td>
<td>print out messages as it runs</td>
</tr>
<tr>
<td>/version</td>
<td>print out the version of OfficeToPDF and exit</td>
</tr>
<tr>
<td>/working_dir <em><path></em></td>
<td>a path to copy the input file into temporarily when running the conversion</td>
</tr>
</tbody>
</table>
<h2 id="error_codes">Error Codes</h2>
<hr>
<p>The following error codes are returned by OfficeToPDF. Note that multiple errors are returned as a bitmask, so bitwise operations can test for multiple errors.</p>
<p>0 - Success<br>
1 - Failure<br>
2 - Unknown Error<br>
4 - File protected by password<br>
8 - Invalid arguments<br>
16 - Unable to open the source file<br>
32 - Unsupported file format<br>
64 - Source file not found<br>
128 - Output directory not found<br>
256 - The requested worksheet was not found<br>
512 - Unable to use an empty worksheet<br>
1024 - Unable to modify or open a protected PDF</p>
<h2>About CogniDox</h2>
<hr>
<p>CogniDox is a web-based, document management software tool aimed primarily at supporting high-tech product development. It enables better product lifecycle management and knowledge transfer from developers to partners, clients and customers.<br>
<br>
We provide highly-integrated support for system engineering workflows and the product lifecycle. Plug-ins are provided for CMS products, software SCM tools, EDA tools, CRM systems, CAD tools and Help Desk applications. Our "instant Extranet" solution enables
companies to add a secure self-service customer portal onto their public web sites.<br>
<br>
Based in Cambridge, UK since its formation in 2008, CogniDox has an impressive portfolio of blue chip users – see examples at
<a title="CogniDox Customers" href="https://www.cognidox.com/customers" target="_blank">
https://www.cognidox.com/customers</a></p>
</div><div class="ClearBoth"></div>