##############################
# 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.0
# 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 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

# @since 3.3.0 default PDF output *and* docx ToC page number generation 
# is via Plutext's 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.
# One possibility is converter-eval.plutext.com.  If you try that, please only use it for light testing purposes.
#com.plutext.converter.URL=https://converter-eval.plutext.com:443/v1/00000000-0000-0000-0000-000000000000/convert

# 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

# 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

# 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

# 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