-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathdocx4j.properties
More file actions
432 lines (342 loc) · 20.3 KB
/
docx4j.properties
File metadata and controls
432 lines (342 loc) · 20.3 KB
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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
##############################
# docx setup
# XHTMLImporter needs to know how to convert pixel measurements
# This is read by UnitsOfMeasurement
docx4j.DPI=96
# Page size: use a value from org.docx4j.model.structure.PageSizePaper enum
# eg A4, LETTER
docx4j.PageSize=LETTER
# Page size: use a value from org.docx4j.model.structure.MarginsWellKnown enum
docx4j.PageMargins=NORMAL
docx4j.PageOrientationLandscape=false
# These will be injected into docProps/app.xml
# if App.Write=true; as of 6.1 this is only done for new documents, in order to preserve whatever was there already
docx4j.App.write=true
docx4j.Application=docx4j
docx4j.AppVersion=8.3
# of the form XX.YYYY where X and Y represent numerical values
# WARNING: -SNAPSHOT will cause Word 2010 x64 to treat the docx as corrupt!
# so we set it here, instead of using Version.getDocx4jVersion()
# These will be injected into docProps/core.xml; creator is only set if not already present (lastModifiedBy is fair game)
docx4j.dc.write=true
#docx4j.dc.creator.value=docx4j
#docx4j.dc.lastModifiedBy.value=docx4j
# By default, docx4j often logs an error before re-throwing, for easier diagnosis.
# After v3.3.2, this property allowed you to stop that logging if you want
# In v6.1.0, most of these log events were removed
# https://github.com/plutext/docx4j/pull/329
# so this property is now only used in our XSLT LoggingErrorListener
docx4j.openpackaging.exceptions.LogBeforeThrow=true
# If this is set to a positive value, docx4j will throw
# a PartTooLarge exception if a part being unmarshalled from a zip file is
# larger than the set value. Purpose is to avoid unmarshalling
# files which will take too long (eg a 300MB document.xml part).
# Setting this still allows the docx to be unzipped, in case there
# are things you want to do with it (short of unmarshalling this part)
# since docx4j 6.0.0
docx4j.openpackaging.parts.MAX_BYTES.unmarshal.error=-1
# If this is set to a positive value, docx4j will throw
# a PartTooLarge exception if a part being loaded from a zip file is
# larger than the set value. This will prevent this docx from
# being opened at all.
# since docx4j 6.0.0
docx4j.openpackaging.parts.MAX_BYTES.unzip.error=-1
# named so could potentially have unzip.warn
##############################
# pptx setup
# Page size: use a value from org.pptx4j.model.SlideSizesWellKnown enum
# eg A4, LETTER
pptx4j.PageSize=LETTER
pptx4j.PageOrientationLandscape=true
pptx4j.openpackaging.packages.PresentationMLPackage.DefaultTheme=org/docx4j/openpackaging/parts/PresentationML/theme.xml
# docx4j-documents4j-local, docx4j-documents4j-remote:
# documents4j now supports pptx to PDF,
# however PowerPoint must run in the foreground, which opens PowerPoint
# on the executing machine which can cause problems in some environments.
# For docx4j-documents4j-local, you can disable it here,
# by setting this to false.
# (Typically you would disable it if it is causing problems
# and you are only doing docx or xlsx conversions, for which it isn't required)
# For docx4j-documents4j-remote, this setting is not relevant,
# since powerpoint conversion only works if you specifically enable it
# when you start the remote server, for example:
# java -jar documents4j-server-standalone-1.1.8-shaded.jar http://192.168.0.33:9998
# --enable com.documents4j.conversion.msoffice.MicrosoftPowerpointBridge
# @since docx4j 8.3.2
pptx4j.documents4j.MicrosoftPowerpointBridge.enabled=true
##############################
# docx4j general config
#
#docx4j.McPreprocessor=true
# Use output method "xml" (as opposed to "html")
docx4j.Convert.Out.HTML.OutputMethodXML=true
# convert a bookmark to anchor (a), @id (id), or ignore (null)
# defaults to anchor. @since 3.2.1
docx4j.Convert.Out.HTML.BookmarkStartWriter.mapTo=a
# If false, throw an exception if something is encountered which
# output processing is unable to handle. TODO fully implement this.
docx4j.Convert.Out.Lossy=true
# documents4j for PDF output, TOC update, and importing, either a local instance or remote
# To use, add either docx4j-documents4j-local or docx4j-documents4j-remote to your classpath
# then configure below
# @since 8.2.0
# local config:
#docx4j.convert.out.documents4j.local.tmpDir=C:\\Users\\name\\tmp_docuj
#com.documents4j.conversion.msoffice.word_convert.vbs=C:\\Users\\name\\git\\docx4j\\docx4j-samples-resources\\src\\main\\resources\\documents4j_word_convert.vbs
# remote config:
#docx4j.convert.out.documents4j.remote.tmpDir=/home/name/tmp_docuj
#docx4j.convert.out.documents4j.remote.Uri=http://192.168.0.31:9998
# @since 3.3.0
#docx4j.convert.out.fop.FopConfParser.defaultBaseURI=[your absolute URI]
# @since 3.3.0
# To enable hyphenation in PDF output via XSL FO, you need to set this to true,
# and configure hyphenation in FOP, see https://xmlgraphics.apache.org/fop/1.0/hyphenation.html
docx4j.convert.out.fo.hyphenate=false
# @since 3.3.0 default PDF output *and* docx ToC page number generation
# was via Plutext's now retired commercial converter
# (if you want to use FOP, just put docx4j-export-fo and its dependencies
# on your classpath)
# Set the URL of the endpoint here.
# Since 6.1.0, the default is http://127.0.0.1:9016/v1/00000000-0000-0000-0000-000000000000/convert
# (which will only work if you download and install the converter there)
# Set this property to point at some other instance.
# In 6.1.0, docx4j checks bookmarks are OK (ie no duplicates, no missing starts or ends),
# before using them for ToC operations.
# The default behaviour is to throw an exception if any bookmarks are broken.
# Set this to try to have docx4j fix them. It does this by DELETING broken bookmarks.
# A future version might instead try to be more graceful, by inserting missing starts or ends nearby.
# @since 6.1.0
docx4j.toc.BookmarksIntegrity.remediate=false
# If true, parse 12/04/2012 as 4 December
docx4j.Fields.Dates.DateFormatInferencer.USA=false
# A (non-Word-standard) percent format for fields which multiplies
# the value by hundred (as java formatting does)
# For example, when set to true, formatting 0.33 with "\\# ##%" yields 33%.
# See further FormattingSwitchHelperNumericTests
# Defaults to false (preserving existing behavior).
# @since 6.1.2
docx4j.Fields.Numbers.JavaStylePercentHandling=false
# What to treat as the decimal point when converting a string
# to a number. Fallback only,
# used if the docx itself does not contain a setting for
# <w:decimalSymbol />
docx4j.Fields.Numbers.DecimalSymbol=.
# What character may be used to group thousands
docx4j.Fields.Numbers.GroupingSeparator=,
# What character may be used to separate styles and levels in \t switch field argument
docx4j.Fields.TOC.SwitchT.Separator=,
# PDF output; ability to specify font substitutions. See src/samples/_resources
# Avoid using both this and fontMapper.getFontMappings() for the same fonts!
# since docx4j 3.2.0
#docx4j.fonts.fop.util.FopConfigUtil.substitutions=fop-substitutions.xml
# Use FOP's "simulate-style" attribute to generates bold and oblique looking glyphs for PDF output
# where those font variations are not available. Useful for Chinese (eg PMingLiU) which lacks a bold variant
# since docx4j 8.3.0; defaults to false
docx4j.fonts.fop.util.FopConfigUtil.simulate-style=true
# This override available since docx4j 3.2.0
# Defaults to org/docx4j/fonts/microsoft/MicrosoftFonts.xml
# which is contained in the docx4j jar
# If you need to override it in order to provide different file names for
# one or more fonts, start by extracting and editing a copy of the existing file
docx4j.fonts.microsoft.MicrosoftFonts=org/docx4j/fonts/microsoft/MicrosoftFonts.xml
# Emoji font: specify which installed font to substitute for use with emoji glyphs,
# for example, Segoe UI Emoji (on Windows), or Apple Color Emoji (on OSX)
# TODO get Noto Color Emoji working
# since docx4j 8.2.7
#docx4j.fonts.RunFontSelector.EmojiFont=Segoe UI Emoji
# In XHTML import, span/@style='background-color:red;' would usually become w:rPr/w:shd/@w:fill="ff0000"
# Set this to true to use w:highlight instead
docx4j.model.properties.PropertyFactory.createPropertyFromCssName.background-color.useHighlightInRPr=true
# Whether to System.gc() before attempting to delete tmp image files.
# Introduced in docx4j 3. For consistency with previous versions, default is true
docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.TempFiles.ForceGC=true
# Unmarshalling via a DOM document (for XPath binder) can be 5x slower than
# unmarshalling an input stream directly!
# This setting lets you avoid eager unmarshalling via DOM, unless you know you'll be using XPath
# (XPath should still work either way, but creating the binder is deferred where eager=false)
# since docx4j 3.3.0
docx4j.openpackaging.parts.JaxbXmlPartXPathAware.binder.eager.MainDocumentPart=false
docx4j.openpackaging.parts.JaxbXmlPartXPathAware.binder.eager.OtherParts=false
# This override available since docx4j 3.2.0
# Defaults to org/docx4j/jaxb/mc-preprocessor.xslt
docx4j.jaxb.JaxbValidationEventHandler=custom-preprocessor.xslt
# Whether to pretty print XML parts (defaults to true)
# since docx4j 3.2.0
docx4j.jaxb.formatted.output=true
# in 3.3.x this only works if docx4j.jaxb.marshal.canonicalize=false
# Whether to canonicalize during marshalling (defaults to false).
# This is mainly for aesthetic purposes: the Sun/Oracle JAXB reference implementation
# writes a lot of unnecessary namespaces (each one in the JAXB context?). MOXy is better.
# Set this to true to get rid of them via an extra step: canonicalization
# since docx4j 3.3.1
docx4j.jaxb.marshal.canonicalize=false
# docx4j, since v6.0, writes a comment to the Main Document Part which identifies
# what version it was produced with. Use this property to suppress that.
# since docx4j 6.1
docx4j.jaxb.marshal.suppressVersionComment=false
# docx4j, in v6.0 (and unlike earlier versions), marshalled to OutputStream via XMLStreamWriter.
# In 6.1, the default is again to marshall directly to the specified OutputStream.
# The option to marshal via XMLStreamWriter (like in v6.0) is provided here, but its
# probably not useful until such time as we provide a way for the user to use their own XMLStreamWriter.
# since docx4j 6.1
docx4j.openpackaging.parts.JaxbXmlPart.MarshalToOutputStreamViaXMLStreamWriter=false
# ImageMagick 7 deprecates convert; use magick instead. Defaults to imconvert.
# since docx4j 3.3.4
#org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.ImageMagickExecutable=magick
# The styles part content used by WordprocessingMLPackage createPackage
# and by getStyleDefinitionsPart(true) where the styles part is null
# This override available since docx4j 3.2.0
docx4j.openpackaging.parts.WordprocessingML.StyleDefinitionsPart.DefaultStyles=org/docx4j/openpackaging/parts/WordprocessingML/styles.xml
# Used to try to activate a style (PropertyResolver.activateStyle) which isn't defined in the styles part
# This override available since docx4j 3.2.0
docx4j.openpackaging.parts.WordprocessingML.StyleDefinitionsPart.KnownStyles=org/docx4j/openpackaging/parts/WordprocessingML/KnownStyles.xml
docx4j.openpackaging.parts.WordprocessingML.FontTablePart.DefaultFonts=org/docx4j/openpackaging/parts/WordprocessingML/fontTable.xml
docx4j.openpackaging.parts.WordprocessingML.NumberingDefinitionsPart.DefaultNumbering=org/docx4j/openpackaging/parts/WordprocessingML/numbering.xml
# Embedded Fonts - extract to dir
# By default, docx4j will extract embedded fonts to dir
# ~/.docx4all/temporary embedded fonts
# (creating it if necessary).
#docx4j.openpackaging.parts.WordprocessingML.ObfuscatedFontPart.tmpFontDir=c:\\temp
# OpenDoPE
# In 6.1.0, OpenDoPE component processing is done before condition/repeat processing.
# But it is turned off by default. If you want to use components, set this to true
# (you will need Enterprise jar on your classpath)
# @since 6.1.0
docx4j.model.datastorage.OpenDoPEHandlerComponents.enabled=false
# Whether to use the "quick n dirty" heuristic to treat some results as
# boolean or int without allowing an exception to happen first.
# Defaults to true. True may be quicker. False may be better for your XPaths.
# Advanced users may wish to try both. Please report your results in the forum.
docx4j.openpackaging.parts.XmlPart.cachedXPathGetString.heuristic=true
# Whether to use the XSLT or non-XSLT implementation for the binding step.
# Defaults to BindingTraverserXSLT, which is slower, but fully featured.
#docx4j.model.datastorage.BindingHandler.Implementation=BindingTraverserNonXSLT
docx4j.model.datastorage.BindingTraverser.XHTML.Block.rStyle.Adopt=true
# For BindingTraverserXSLT, which xslt?
docx4j.model.datastorage.BindingTraverserXSLT.xslt=org/docx4j/model/datastorage/bind.xslt
# if a validation event occurs, causing probable loss of content,
# whether to produce output or not. Default is false (consistent with previous behaviour).
# (since 3.3.6)
docx4j.model.datastorage.BindingTraverserXSLT.ValidationEventContinue=false
# .. placeholder to use instead of "Click here to enter text"
# Defaults to OpenDoPE/placeholder.xml, and if nothing is there,
# will fallback to org/docx4j/model/datastorage/placeholder.xml (which is in the docx4j jar)
#docx4j.model.datastorage.placeholder=OpenDoPE/placeholder.xml
# From 6.1.0, there is an optional step in which an xslt can be applied to transform
# the document part (typically content controls). For example, you might want
# to shade a table row if it contains certain values (and you might consider it neater
# to do it this way, rather than cluttering your docx with extra conditions). Content
# controls can contain an od:finish tag to make it easier to apply templates to them,
# and to provide a heads-up that that content might be affected in this step.
# This property is read by XsltProviderImpl (which implements XsltProvider); you
# can provide your own implementation instead (if for example you have many docx templates,
# and want to have a separate XSLT for each docx). See src/samples/_resources for sample XSLT
# docx4j.model.datastorage.XsltFinisher.xslt=XsltFinisherCustom.xslt
# docx4j.model.datastorage.XsltFinisher.xslt=XsltFinisher.xslt
# RemovalHandler can remove certain content controls from the output docx
# (retaining their contents). With this property you can replace the XSLT which is used to do this.
# (since 6.1.0)
#docx4j.model.datastorage.RemovalHandler.xslt=org/docx4j/model/datastorage/RemovalHandler.xslt
# Specify the SDTs RemovalHandler should remove. Historically the Docx4j facade has used Quantifier ALL,
# so that's the default here.
# (since 6.1.0)
#docx4j.model.datastorage.RemovalHandler.Quantifier=ALL_BUT_PLACEHOLDERS
# You can set this to false if you don't use OpenDoPEReverter; it omits some empty content controls from the BindlingHandler
# step, so it may speed processing up marginally, and make ODH's output easier to read. Defaults to true.
docx4j.model.datastorage.OpenDoPEReverter.Supported=true
# Old versions of Word (2007, 2010) can't handle an SdtPr/w:tag value longer than 64 chars
# If this flag is enabled (default is true), docx4j will warn when a long tag is encountered.
# (NOT IMPLEMENTED IN v8)
#docx4j.wml.SdtPr.Tag.LengthExceeds64Warning=true
# These affect the output of numbers in Arabic; see further RunFontSelector
# For further discussion, please see http://www.docx4java.org/forums/pdf-output-f27/arabic-number-digits-in-pdf-output-t1826.html
# Value can be 'Context'|'National'
docx4j.MicrosoftWindows.Region.Format.Numbers.NativeDigits=National
# Value can be 'Hindi'|'Context'|'Arabic'|'System'; default is Arabic ie 1234
docx4j.MicrosoftWord.Numeral=Arabic
# Whether events are published asynchronously (in which case order is not guaranteed). Default is false.
docx4j.events.Docx4jEvent.PublishAsync=false
# Provides default toc style definitions,
# for use if none are defined in the docx itself.
docx4j.toc.TocStyles.xml=org/docx4j/toc/TocStyles.xml
##############################
# JAXP factories
# Properties which XmlUtils uses to determine the factory class to be used for SAX style parsing
# Use the following, if specified here
#javax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
# If that is commented, then do nothing if the following is true (default is false)
#docx4j.javax.xml.parsers.SAXParserFactory.donotset=true
# If the javax.xml.parsers.SAXParserFactory is not specified, and donotset is false,
# AND you are using Sun/Oracle Java 6/7,
# "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl" will be used
# (avoiding Crimson).
# Properties which XmlUtils uses to determine the factory class to be used for DOM style parsing
# Use the following, if specified here
#javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
# If that is commented, then do nothing if the following is true (default is false)
#docx4j.javax.xml.parsers.DocumentBuilderFactory.donotset=true
# If the javax.xml.parsers.DocumentBuilderFactory is not specified, and donotset is false,
# AND you are using Sun/Oracle Java 6/7,
# "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl" will be used
# TransformerFactory Property? that specifies the factory class to be used when transforming documents using
# the javax.xml.transform packages.
# "org.docx4j.apache.xalan.processor.TransformerFactoryImpl"
# is used in docx4j 11. Requires our Xalan on your classpath.
# Note: if you chose something else, HTML and PDF output won't work, since
# these rely on Xalan extension functions.
# docx4j stores a TransformerFactory in XmlUtils. It shouldn't affect the system-wide property.
# Bottom line: add Xalan to your classpath. this property is NOT IMPLEMENTED.
# XPathFactory NOT USED
##############################
# docx4j commercial/enterprise settings
# MergeDocx setup
# ^^^^^^^^^^^^^^^
# MergeDocx renames bookmarks (appending _document number) to ensure
# uniqueness. In some applications, hyperlinks in one document target
# another by bookmark name, and in that case, you want the names left
# as is (and it is up to you to ensure they are unique across documents)
# @since 6.1.0
com.plutext.merge.BookmarkRenaming=true
# If the last document being merged contains a sectPr in its final P,
# this will be set as the body-level sectPr.
# Prior to v 8.2.0.2, we would also retain the P-level sectPr,
# so there would be two of them, each with the same relIds.
# It turns out that Word does not like this, if a header or footer
# contains for example a text box. (An image however seems ok).
# So from Enterprise v8.2.0.2, the default behaviour is to remove
# the P-level sectPr. Set this to false if you want to keep it.
# com.plutext.merge.DocumentBuilder.LastDocument.SectPr.RemovePromoted=true
# MergePptx setup
# ^^^^^^^^^^^^^^^
# Obsolete setting: Prior to 8.1.0, AlternateContent had to be removed from the Slides.
# If it wasn't, Powerpoint 2010 might complain that the presentation needs to be repaired.
# docx4j 3.0 did this; But if you are using docx4j 2.8.1, then setting this to
# true will have MergePptx do it. Default is false.
# MergePptx.AlternateContentFallback=true
# PowerPoint 2010 introduced the concept of sections (p14:sectionLst)
# Set this property to true if you want to retain sections (default is false)
# (since 8.1.0)
com.plutext.merge.pptx.SectionAware=false
# XML Dig Signature setup
# ^^^^^^^^^^^^^^^^^^^^^^^
# @since 3.3.0
# The property XAdESLevel supports the following values:
# 0 - XAdES Off (Create XML-DSig signatures)
# 1 - Create XAdES-EPES signatures
# 2 - Create XAdES-T signatures
com.plutext.dsig.XAdES.Level=1
# if you use XAdES for a digital signature in Office 2013, the digital signature will not be compatible
# with Office 2010 or 2007 unless you configure the Group Policy setting, Do not include
# XAdES reference object in the manifest, and set it to Enabled. This is similar.
# TODO - NOT IMPLEMENTED
# com.plutext.dsig.XAdES.ExcludeFromManifest=true
# Check the XAdES portions of a digital signature
# This policy setting lets you specify whether docx4j checks the XAdES portions of a digital signature
# when validating a digital signature for a document.
# TODO - NOT IMPLEMENTED
# com.plutext.dsig.XAdES.Validation=true
# Do not allow expired certificates when validating signatures
# This policy setting lets you configure whether Office 2013 applications accept expired digital certificates
# when verifying digital signatures.
# TODO - NOT IMPLEMENTED
# com.plutext.dsig.ValidationAllowExpiredCertificates=true