Docx4j问题转换为pdf

时间:2015-09-09 08:04:29

标签: apache-fop docx4j


我知道这个控制台报告中存在很多问题,但由于我不是docx4j和所有相关软件包中的专家,所以我'我希望得到一些解释,尤其是它有格式问题的原因。 请给我一些帮助。

 This is the console output
09:40:08,964 WARN  [org.docx4j.fonts.PhysicalFonts] (http-/0.0.0.0:8080-5) Aborting: file:/C:/Windows/FONTS/impact.ttf (can't get EmbedFontInfo[] .. try deleting fop-fonts.cache?)
09:40:09,025 INFO  [org.docx4j.fonts.RunFontSelector] (http-/0.0.0.0:8080-5) rPrDefault/rFonts referenced Times New Roman
09:40:09,477 INFO  [org.docx4j.openpackaging.parts.WordprocessingML.FontTablePart] (http-/0.0.0.0:8080-5) Writing temp embedded fonts 1441784409477
09:40:09,477 WARN  [org.docx4j.fonts.Mapper] (http-/0.0.0.0:8080-5) Overwriting existing fontMapping: times new roman
1431.919: [GC1431.920: [ParNew: 294580K->34048K(306688K), 0.0955748 secs] 547471K->310588K(1300224K), 0.0957060 secs] [Times: user=0.19 sys=0.03, real=0.09 secs] 
09:41:27,123 INFO  [org.docx4j.fonts.RunFontSelector] (http-/0.0.0.0:8080-5) rPrDefault/rFonts referenced Times New Roman
09:41:27,364 INFO  [org.docx4j.openpackaging.parts.WordprocessingML.FontTablePart] (http-/0.0.0.0:8080-5) Writing temp embedded fonts 1441784487364
09:41:27,374 INFO  [org.docx4j.convert.out.common.preprocess.FieldsCombiner] (http-/0.0.0.0:8080-5) starting
09:41:27,384 INFO  [org.docx4j.convert.out.common.preprocess.CoverPageSectPrMover] (http-/0.0.0.0:8080-5) No need to move sectPr 
09:41:27,514 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId9 points to header1.xml
09:41:27,514 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId10 points to footer1.xml
09:41:27,514 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId11 points to footer2.xml
09:41:27,514 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId9 points to header1.xml
09:41:27,514 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId10 points to footer1.xml
09:41:27,514 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId11 points to footer2.xml
09:41:27,534 INFO  [org.docx4j.fonts.RunFontSelector] (http-/0.0.0.0:8080-5) rPrDefault/rFonts referenced Times New Roman
09:41:27,779 INFO  [org.docx4j.convert.out.common.AbstractConversionContext] (http-/0.0.0.0:8080-5) /pkg:package
1500.214: [GC1500.214: [ParNew: 306688K->34047K(306688K), 0.1032470 secs] 583228K->343685K(1300224K), 0.1033414 secs] [Times: user=0.19 sys=0.02, real=0.10 secs] 
09:41:29,249 INFO  [org.docx4j.fonts.RunFontSelector] (http-/0.0.0.0:8080-5) rPrDefault/rFonts referenced Times New Roman
09:41:29,543 INFO  [org.docx4j.openpackaging.parts.WordprocessingML.FontTablePart] (http-/0.0.0.0:8080-5) Writing temp embedded fonts 1441784489543
09:41:29,553 INFO  [org.docx4j.convert.out.common.preprocess.FieldsCombiner] (http-/0.0.0.0:8080-5) starting
09:41:29,553 INFO  [org.docx4j.convert.out.common.preprocess.CoverPageSectPrMover] (http-/0.0.0.0:8080-5) No need to move sectPr 
09:41:29,553 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId9 points to header1.xml
09:41:29,553 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId10 points to footer1.xml
09:41:29,553 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId11 points to footer2.xml
09:41:29,553 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId9 points to header1.xml
09:41:29,553 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId10 points to footer1.xml
09:41:29,553 INFO  [org.docx4j.openpackaging.parts.relationships.RelationshipsPart] (http-/0.0.0.0:8080-5) rId11 points to footer2.xml
09:41:29,553 INFO  [org.docx4j.fonts.RunFontSelector] (http-/0.0.0.0:8080-5) rPrDefault/rFonts referenced Times New Roman
09:41:29,563 INFO  [org.docx4j.convert.out.common.AbstractConversionContext] (http-/0.0.0.0:8080-5) /pkg:package
09:41:29,583 INFO  [org.docx4j.model.images.AbstractConversionImageHandler] (http-/0.0.0.0:8080-5) Wrote @src='file:/C:/Users/DANILO~1/AppData/Local/Temp/0b3f4416-448a-438b-9c7a-e57c7a513433image1.jpeg
09:41:29,593 INFO  [org.docx4j.model.images.AbstractConversionImageHandler] (http-/0.0.0.0:8080-5) Wrote @src='file:/C:/Users/DANILO~1/AppData/Local/Temp/0b3f4416-448a-438b-9c7a-e57c7a513433image2.jpeg
09:41:29,787 WARN  [org.docx4j.convert.out.common.AbstractConversionContext] (http-/0.0.0.0:8080-5) NOT IMPLEMENTED: support for w:instrText; 
09:41:29,797 WARN  [org.docx4j.convert.out.common.AbstractConversionContext] (http-/0.0.0.0:8080-5) NOT IMPLEMENTED: support for w:instrText; 
09:41:29,818 INFO  [org.docx4j.fonts.RunFontSelector] (http-/0.0.0.0:8080-5) rPrDefault/rFonts referenced Times New Roman
09:41:29,858 INFO  [org.docx4j.fonts.PhysicalFonts] (http-/0.0.0.0:8080-5) No italic form for: Wingdings
09:41:29,858 INFO  [org.docx4j.fonts.PhysicalFonts] (http-/0.0.0.0:8080-5) No italic form for: Symbol
09:41:29,858 WARN  [org.docx4j.convert.out.fo.renderers.FORendererApacheFOP] (http-/0.0.0.0:8080-5) Can't set up FOP svn; org.apache.fop.apps.FopConfParser from [Module "deployment.NetiEar.ear.NetiWeb.war:main" from Service Module Loader]
09:41:30,138 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.

09:41:30,138 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.

09:41:30,138 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

09:41:30,228 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.

09:41:30,228 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

09:41:30,238 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.

09:41:30,238 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

09:41:30,248 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Font "Times New Roman,normal,400" not found. Substituting with "any,normal,400".
09:41:30,288 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.

09:41:30,288 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

09:41:30,288 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.

09:41:30,288 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

09:41:30,288 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1043)
09:41:30,288 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Font "Symbol,normal,700" not found. Substituting with "Symbol,normal,400".
09:41:30,288 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Font "ZapfDingbats,normal,700" not found. Substituting with "ZapfDingbats,normal,400".
09:41:30,288 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Font "Times New Roman,normal,700" not found. Substituting with "any,normal,700".
09:41:30,298 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Font "Arial,normal,400" not found. Substituting with "any,normal,400".
09:41:30,308 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.

09:41:30,308 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

09:41:30,308 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:30,338 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 1 in block-progression direction by 549754 millipoints. (See position 1:958)
09:41:30,358 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1043)
09:41:30,368 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:30,378 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 2 in block-progression direction by 549754 millipoints. (See position 1:958)
09:41:30,388 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1043)
09:41:30,408 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:30,408 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 3 in block-progression direction by 549754 millipoints. (See position 1:958)
1502.007: [GC1502.007: [ParNew: 306687K->34048K(306688K), 0.0900753 secs] 616325K->369676K(1300224K), 0.0901621 secs] [Times: user=0.19 sys=0.00, real=0.09 secs] 
09:41:30,518 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1043)
09:41:30,528 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:30,538 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 4 in block-progression direction by 549754 millipoints. (See position 1:958)
09:41:30,648 INFO  [org.docx4j.model.images.AbstractConversionImageHandler] (http-/0.0.0.0:8080-5) Wrote @src='file:/C:/Users/DANILO~1/AppData/Local/Temp/7b2d891a-50f5-4802-8577-ef4c1859f186image1.jpeg
09:41:30,658 INFO  [org.docx4j.model.images.AbstractConversionImageHandler] (http-/0.0.0.0:8080-5) Wrote @src='file:/C:/Users/DANILO~1/AppData/Local/Temp/7b2d891a-50f5-4802-8577-ef4c1859f186image2.jpeg
09:41:30,818 WARN  [org.docx4j.convert.out.common.AbstractConversionContext] (http-/0.0.0.0:8080-5) NOT IMPLEMENTED: support for w:instrText; 
09:41:30,842 WARN  [org.docx4j.convert.out.common.AbstractConversionContext] (http-/0.0.0.0:8080-5) NOT IMPLEMENTED: support for w:instrText; 
09:41:30,952 INFO  [stdout] (http-/0.0.0.0:8080-5) 1.

09:41:30,982 INFO  [stdout] (http-/0.0.0.0:8080-5) 2.

09:41:30,992 INFO  [stdout] (http-/0.0.0.0:8080-5) 3.

09:41:31,002 INFO  [stdout] (http-/0.0.0.0:8080-5) 4.

09:41:31,272 WARN  [org.docx4j.model.properties.paragraph.Indent] (http-/0.0.0.0:8080-5) Only left/first-line indentation is handled at present
09:41:31,272 WARN  [org.docx4j.model.properties.paragraph.Indent] (http-/0.0.0.0:8080-5) Only left/first-line indentation is handled at present
09:41:31,442 WARN  [org.docx4j.model.properties.paragraph.Indent] (http-/0.0.0.0:8080-5) Only left/first-line indentation is handled at present
09:41:31,452 WARN  [org.docx4j.model.properties.paragraph.Indent] (http-/0.0.0.0:8080-5) Only left/first-line indentation is handled at present
09:41:31,642 WARN  [org.docx4j.convert.out.common.AbstractConversionContext] (http-/0.0.0.0:8080-5) NOT IMPLEMENTED: support for w:smartTagPr; 
09:41:31,662 WARN  [org.docx4j.convert.out.common.AbstractConversionContext] (http-/0.0.0.0:8080-5) NOT IMPLEMENTED: support for w:smartTagPr; 
09:41:31,722 INFO  [org.docx4j.convert.out.fo.AbstractFOExporter] (http-/0.0.0.0:8080-5) Saved C:\Users\danilo petrone\Desktop\tmpDocx8474582827974641306.docxDocumento_modificato.fo
09:41:31,722 INFO  [org.docx4j.fonts.RunFontSelector] (http-/0.0.0.0:8080-5) rPrDefault/rFonts referenced Times New Roman
09:41:31,914 INFO  [org.docx4j.fonts.PhysicalFonts] (http-/0.0.0.0:8080-5) No italic form for: Wingdings
09:41:31,914 INFO  [org.docx4j.fonts.PhysicalFonts] (http-/0.0.0.0:8080-5) No italic form for: Symbol
09:41:31,914 WARN  [org.docx4j.convert.out.fo.renderers.FORendererApacheFOP] (http-/0.0.0.0:8080-5) Can't set up FOP svn; org.apache.fop.apps.FopConfParser from [Module "deployment.NetiEar.ear.NetiWeb.war:main" from Service Module Loader]
09:41:32,075 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Font "Symbol,normal,700" not found. Substituting with "Symbol,normal,400".
09:41:32,075 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Font "ZapfDingbats,normal,700" not found. Substituting with "ZapfDingbats,normal,400".
1504.039: [GC1504.039: [ParNew: 306688K->34047K(306688K), 0.2034662 secs] 642316K->424256K(1300224K), 0.2035597 secs] [Times: user=0.38 sys=0.00, real=0.21 secs] 
09:41:32,770 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1041)
09:41:32,789 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:32,811 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 1 in block-progression direction by 670 millipoints. (See position 1:956)
09:41:32,811 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-after on page 1 in block-progression direction by 286 millipoints. (See position 3:4954)
09:41:32,901 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.

09:41:32,901 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

09:41:32,901 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.

09:41:32,901 ERROR [stderr] (http-/0.0.0.0:8080-5) Warning:  __redirected.__XMLReaderFactory: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

09:41:32,901 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Rendered page #1.
09:41:32,911 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1041)
09:41:32,921 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:32,931 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 2 in block-progression direction by 670 millipoints. (See position 1:956)
09:41:32,931 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-after on page 2 in block-progression direction by 286 millipoints. (See position 3:4954)
09:41:32,971 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Rendered page #2.
09:41:32,971 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1041)
09:41:32,981 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:32,991 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 3 in block-progression direction by 670 millipoints. (See position 1:956)
09:41:32,991 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-after on page 3 in block-progression direction by 286 millipoints. (See position 3:4954)
09:41:33,022 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Rendered page #3.
09:41:33,032 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1041)
09:41:33,032 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:33,042 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 4 in block-progression direction by 670 millipoints. (See position 1:956)
09:41:33,042 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-after on page 4 in block-progression direction by 286 millipoints. (See position 3:4954)
09:41:33,062 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Rendered page #4.
09:41:33,072 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1041)
09:41:33,072 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:33,082 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 5 in block-progression direction by 670 millipoints. (See position 1:956)
09:41:33,082 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-after on page 5 in block-progression direction by 286 millipoints. (See position 3:4954)
09:41:33,102 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Rendered page #5.
09:41:33,112 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1041)
09:41:33,112 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:33,122 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 6 in block-progression direction by 670 millipoints. (See position 1:956)
09:41:33,122 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-after on page 6 in block-progression direction by 286 millipoints. (See position 3:4954)
09:41:33,142 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Rendered page #6.
09:41:33,152 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1041)
09:41:33,162 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:33,162 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 7 in block-progression direction by 670 millipoints. (See position 1:956)
09:41:33,162 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-after on page 7 in block-progression direction by 286 millipoints. (See position 3:4954)
09:41:33,182 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Rendered page #7.
09:41:33,192 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1041)
09:41:33,192 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:33,202 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 8 in block-progression direction by 670 millipoints. (See position 1:956)
09:41:33,202 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-after on page 8 in block-progression direction by 286 millipoints. (See position 3:4954)
09:41:33,222 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Rendered page #8.
09:41:33,222 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Line 1 of a paragraph overflows the available area by more than 50 points. (See position 1:1041)
09:41:33,222 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) An fo:table  (See position 3:425) is wider than the available room in inline-progression-dimension. Adjusting end-indent based on overconstrained geometry rules (XSL 1.1, ch. 5.3.4)
09:41:33,232 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-before on page 9 in block-progression direction by 670 millipoints. (See position 1:956)
09:41:33,232 WARNING [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Content overflows the viewport of the fo:region-after on page 9 in block-progression direction by 286 millipoints. (See position 3:4954)
09:41:33,242 INFO  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:8080-5) Rendered page #9.
09:41:33,292 INFO  [it.led.neti.common.logutente.LogUtenteEngine] (http-/0.0.0.0:8080-5) 
public void docx2PDF(String filePath){

        String regex = ".*(calibri|camb|cour|arial|times|comic|georgia|impact|LSANS|pala|tahoma|trebuc|verdana|symbol|webdings|wingding).*";
        PhysicalFonts.setRegex(regex);

        FieldUpdater updater = new FieldUpdater(wordMLPackage);
        try {
            updater.update(true);
        } catch (Docx4JException e) {
            logger.error("Errore nel preprocessing PDF ");
        }
        Mapper fontMapper = new IdentityPlusMapper();
        try {
            wordMLPackage.setFontMapper(fontMapper);
        } catch (Exception e) {
            logger.error("Errore nel inserimento del Font Mapper");
        }

        PhysicalFont font = PhysicalFonts.get("Times New Roman"); 

        if (font != null) {
            fontMapper.put("Times New Roman", font);
        }



        FOSettings foSettings = Docx4J.createFOSettings();
        if (true) {
            foSettings.setFoDumpFile(new java.io.File(filePath + "Documento_modificato.fo"));
        }
        foSettings.setWmlPackage(wordMLPackage);
        //foSettings.setApacheFopMime(FOSettings.INTERNAL_FO_MIME);


        OutputStream os;
        try {
            os = new java.io.FileOutputStream(filePath+"Documento_modificato.pdf");
            Docx4J.toFO(foSettings, os, Docx4J.FLAG_EXPORT_PREFER_XSL);
        } catch (FileNotFoundException e1) {
            logger.error("File non trovato");
        } catch (Docx4JException e) {
            logger.error("Errore Nell'esportazione del PDF");
        }

非常感谢。

1 个答案:

答案 0 :(得分:0)

现在我有一个合理的解决方法。
对于那些在JBoss(JBoss EAP 6.3.0.GA(AS 7.4.0.Final-redhat-19))模块(包含jar文件)和相同(或不同版本)jar之间遇到运行时问题的人,遍布你的lib目录:
在这种特殊情况下,问题与Xalan模块和Xerces模块有关,其模块与属于docx4J模块(其中包含Xalan,Serializer作为依赖项)的模块相冲突。
所以我在与Xalan和Xerces模块相关的module.xml文件中删除了对jar的引用。一旦你拥有了所有依赖的Docx4j模块,你就完成了。

下一步将告诉JBoss不要从Docx4J模块加载Xalan和Xerces,或者从其他地方加载JBoss-deployment-structure.xml,这样你就可以加载正确的库,而不会影响仍然链接到您空的模块的那些软件部分。 (不知道)。