I have been running into Problems with the docx4j HTML convertion of a docx.
The main Problem supposed to be, that the docx is generated by a tool. If I open the document in WORD it is opened in compatibilty mode. So far, here is the Output of the convertion Routine:
- Code: Select all
Information: No MOXy JAXB config found; assume not intended..
Warnung: name: com.sun.xml.internal.bind.namespacePrefixMapper value: org.docx4j.jaxb.NamespacePrefixMapperSunInternal@a10a231 .. trying RI.
Information: Using NamespacePrefixMapper, which is suitable for the JAXB RI
Information: Using JAXB Reference Implementation
Information: Not using MOXy; using com.sun.xml.bind.v2.runtime.JAXBContextImpl
Warnung: Couldn't get resource: docx4j.properties
Warnung: Couldn't find/read docx4j.properties; docx4j.properties not found via classloader.
Information: Using com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
Information: Using com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
Information: Detected WordProcessingML package
Information: Instantiated package of type org.docx4j.openpackaging.packages.WordprocessingMLPackage
Information: xpath implementation: org.apache.xpath.jaxp.XPathFactoryImpl
Schwerwiegend: No subclass found for /word/media/image1.png; defaulting to binary
Schwerwiegend: No subclass found for /word/media/image2.png; defaulting to binary
Information: package read; elapsed time: 4845 ms
Information: Lazily unmarshalling /word/document.xml
Information: For org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart, unmarshall via binder
Information: Lazily unmarshalling /word/styles.xml
Information: For org.docx4j.openpackaging.parts.WordprocessingML.StyleDefinitionsPart, unmarshall via binder
Information: ---------------------------------------------------------------> HTML-Package
Information: ---------------------------------------------------------------> WML-Package
Information: ---------------------------------------------------------------> CONVERT
Information: Lazily unmarshalling /docProps/app.xml
Information: unmarshalling org.docx4j.openpackaging.parts.DocPropsExtendedPart
Information: Lazily unmarshalling /docProps/core.xml
Information: unmarshalling org.docx4j.openpackaging.parts.DocPropsCorePart
Information: Lazily unmarshalling /word/endnotes.xml
Information: For org.docx4j.openpackaging.parts.WordprocessingML.EndnotesPart, unmarshall via binder
Information: Lazily unmarshalling /word/footnotes.xml
Information: For org.docx4j.openpackaging.parts.WordprocessingML.FootnotesPart, unmarshall via binder
Information: Lazily unmarshalling /word/numbering.xml
Information: For org.docx4j.openpackaging.parts.WordprocessingML.NumberingDefinitionsPart, unmarshall via binder
Information: Lazily unmarshalling /word/theme/theme1.xml
Information: For org.docx4j.openpackaging.parts.ThemePart, unmarshall via binder
Information: Lazily unmarshalling /word/webSettings.xml
Information: Lazily unmarshalling /word/fontTable.xml
Information: Lazily unmarshalling /word/settings.xml
Information: For org.docx4j.openpackaging.parts.WordprocessingML.DocumentSettingsPart, unmarshall via binder
Warnung: Aborting: file:/C:/Windows/FONTS/ALGER.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/arimon__.ttf (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/BAUHS93.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/BERNHC.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/BROADW.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/CHILLER.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/Gabriola.ttf (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/HARLOWSI.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/HARNGTON.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/HATTEN.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/impact.ttf (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/JOKERMAN.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/JUICE___.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/MSJH.TTC (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/MSJHBD.TTC (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/MSYH.TTC (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/MSYHBD.TTC (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/NewsGothicStd-Bold.otf (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/NewsGothicStd-BoldOblique.otf (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/NewsGothicStd-Oblique.otf (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/NewsGothicStd.otf (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/PLAYBILL.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/SNAP____.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/STENCIL.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Warnung: Aborting: file:/C:/Windows/FONTS/TEMPSITC.TTF (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
Information: fontsInUse..
Information: Style with name Normal, id 'Normal' is default paragraph style
Information: Set virtual style, id 'DocDefaults', name 'DocDefaults'
Information: Style with name Default Paragraph Font, id 'Fuentedeprrafopredeter' is default character style
Information: fontsInUse..
Information: Found existing style named DocDefaults
Information: Style with name Normal, id 'Normal' is default paragraph style
Information: Style with name Default Paragraph Font, id 'Fuentedeprrafopredeter' is default character style
Information: starting
Information: Style with name Normal Table, id 'Tablanormal' is default table style
Information: giving TableStyleFontSizeAndJustification primacy, as per this docx w:compatSetting
Warnung: Expected Normal-Tablaconcuadrcula-BR to have <w:basedOn ??
Information: Preparing StyleTree
Information: Outputting well-formed XHTML..
Information: /pkg:package
Warnung: TODO - implement for CTTblStylePr!
Warnung: TODO - implement for CTTblStylePr!
Warnung: ! null rPr for character style Fuentedeprrafopredeter
I can provide the docx via private message if necessary. It Needs to be converted online, thats why we decided to use docx4j. The document is converted to html and displayed in a browser without loss of Information, but does not look good. If I open the document in word, save it and convert it with the same code it Looks perfect. If someone could give me a hint what may be wrong it realy would be of help. I can Change a lot, but Need to know what to Change.
Thanks a lot.
ChriS