Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Call FOP with Debug Logging
How to turn on debug logging when running the FOP command? I want to get more information to troubleshoot a problem with my FO file.
✍: FYIcenter.com
If want to turn on debug logging when running the FOP command to help troubleshooting
FO file issues, you can follow this tutorial.
1. Modify the fop.bat file to turn on debug logging:
fyicenter> cd \local\fop-2.2\fop fyicenter> copy fop.bat fop-original.bat fyicenter> edit fop.bat ... set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog ... set LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=debug ...
2. Run FOP command and redirect the error output to a log file:
fyicenter> fop examples\fo\basic\simple.fo \temp\simple.pdf 2> \temp\simple.log
3. Open the log file to review log messages:
[DEBUG] ImageImplRegistry - Registered org.apache.fop.image.loader.batik.PreloaderWMF with priority 1000
...
[DEBUG] ContentHandlerFactoryRegistry - Dynamically adding
ContentHandlerFactory: org.apache.fop.render.afp.extensions.AFPExtensionHandlerFactory
...
[DEBUG] FOP - target-resolution set to: 72.0dpi (px2mm=0.35277778)
[DEBUG] FOP - userconfig is null
...
[DEBUG] FontInfo - Registering: sans-serif,normal,400 under F1
[DEBUG] FontInfo - Registering: sans-serif,oblique,400 under F2
[DEBUG] FontInfo - Registering: sans-serif,italic,400 under F2
[DEBUG] FontInfo - Registering: sans-serif,normal,700 under F3
[DEBUG] FontInfo - Registering: sans-serif,oblique,700 under F4
[DEBUG] FontInfo - Registering: sans-serif,italic,700 under F4
...
[DEBUG] IFRenderer - Rendering areas via IF document handler
(org.apache.fop.render.intermediate.EventProducingFilter)...
[DEBUG] FOTreeBuilder - Building formatting object tree
[DEBUG] AreaTreeHandler - Current heap size: 7346KB
[DEBUG] BidiResolver - BD: RESOLVE: org.apache.fop.fo.pagination.PageSequence@14a2528[@id=]
...
[DEBUG] BidiResolver - BD: RESOLVE: RANGES:
[DEBUG] BidiResolver - DR: block { <Extensible Markup Language (XML) 1.0>,
intervals <T[0,36][0](-1)> }
[DEBUG] BidiResolver - DR: block { <>, intervals <> }
[DEBUG] BidiResolver - DR: block { <The Extensible Markup Language (XML) is a subset ...
[DEBUG] BidiResolver - DR: flow { <>, intervals <> }
[DEBUG] BidiResolver - DR: page-sequence { <>, intervals <> }
...
[DEBUG] PageSequenceLayoutManager - Starting layout
[DEBUG] AbstractPageSequenceLayoutManager - [1]
[DEBUG] AbstractBreaker - PLM> flow BPD =671812
[DEBUG] PageProvider - start of the next element list is: page=1 col=0
[DEBUG] TextLayoutManager - GK: [0,36]
[DEBUG] TextLayoutManager - GK: { index = 0, char = E, level = -1, levelPrev = -1,
inWord = false, inSpace = false}
...
[DEBUG] BreakingAlgorithm - Could not find a set of breaking points 1.0
[DEBUG] LineLayoutManager - No set of breaking points found with maxAdjustment = 1.0
[DEBUG] LineLayoutManager - Hyphenation possible? false
[DEBUG] SpaceResolver - ----start space resolution (first=true, last=false)...
[DEBUG] SpaceResolver - ----end space resolution.
[DEBUG] SpaceResolver - ----start space resolution (first=false, last=false)...
...
[INFO] FOUserAgent - Rendered page #1.
[DEBUG] AbstractPageSequenceLayoutManager - page finished: 1, current num: 1
[DEBUG] FOTreeBuilder - endElement for top-level fo:root
[DEBUG] FOTreeBuilder - Parsing of document complete
[DEBUG] AreaTreeHandler - Last page-sequence produced 1 pages.
[DEBUG] PageSequenceLayoutManager - Ending layout
[DEBUG] IDTracker - signalIDProcessed()
[DEBUG] IFRenderer - Rendering finished.
[DEBUG] AreaTreeHandler - Initial heap size: 8219KB
[DEBUG] AreaTreeHandler - Current heap size: 9816KB
[DEBUG] AreaTreeHandler - Total memory used: 1596KB
[DEBUG] AreaTreeHandler - Total time used: 390ms
[DEBUG] AreaTreeHandler - Pages rendered: 1
[DEBUG] AreaTreeHandler - Avg render time: 390ms/page (154pages/min)
2018-04-28, ∼4121🔥, 0💬
Popular Posts:
JDK 17 java.security.jgss.jmod is the JMOD file for JDK 17 Security JGSS (Java Generic Security Serv...
What Is ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is the JAR files of ojdbc.jar, JD...
The Jakarta-ORO Java classes are a set of text-processing Java classes that provide Perl5 compatible...
What Is poi-examples-5.2.3.jar? poi-examples-5.2.3.jar is one of the JAR files for Apache POI 5.2.3,...
JDK 8 tools.jar is the JAR file for JDK 8 tools. It contains Java classes to support different JDK t...