gpt4 book ai didi

java - 当我将报表导出为包含 100,000 个字符的 PDF 格式时,出现 SAXException

转载 作者:行者123 更新时间:2023-12-02 08:19:43 25 4
gpt4 key购买 nike

 [org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format)]
javax.xml.transform.TransformerException: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2243)
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2069)
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1171)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:634)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1088)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1066)
at com.ca.calm.reporter.pdf.PDFGenerator.buildPdf(PDFGenerator.java:1132)
at com.ca.calm.reporter.pdf.PDFGenerator.generatePdf(PDFGenerator.java:848)
at com.ca.calm.reporter.pdf.PDFGenerator.exportReport(PDFGenerator.java:626)
at calmReporter.exportReport(calmReporter.java:521)
at calmReporter.handleRequest(calmReporter.java:161)
at com.ca.elm.common.sponsor.SponsorBase.Run(SponsorBase.java:159)
Caused by: org.xml.sax.SAXException: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:335)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169)
at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:307)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716)
... 12 more

我尝试将报告导出为 XML 格式的 PDF,其中一列包含超过 100,000 个字符。导出失败,我收到 SAXException。我们使用 fop 0.95。

如果您遇到过此类问题,请帮助我。

最佳答案

这似乎在 FOP FAQ 中进行了讨论:

This exception is usually a follow-up error after another exception. Sometimes the original exception gets swallowed by Xalan's default ErrorListener (should be fixed in the latest Xalan release).

解决方法是在 Transformer 上设置显式 ErrorListener

更多详细信息可以在上面的链接中找到。

关于java - 当我将报表导出为包含 100,000 个字符的 PDF 格式时,出现 SAXException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5715768/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com