使用pdfbox加载pdf提示推回缓冲区已满
Caused by: java.io.IOException: Push back buffer is full
[WARN][2024-01-09 16:43:32,892][org.apache.pdfbox.pdfparser.BaseParser]Specified stream length 41367 is wrong. Fall back to reading stream until 'endstream'. [WARN][2024-01-09 16:43:41,364][org.apache.pdfbox.pdfparser.BaseParser]Specified stream length 79043 is wrong. Fall back to reading stream until 'endstream'. org.apache.pdfbox.exceptions.WrappedIOException: Could not push back 79043 bytes in order to reparse stream. Try increasing push back buffer using system property org.apache.pdfbox.baseParser.pushBackSize at org.apache.pdfbox.pdfparser.BaseParser.parseCOSStream(BaseParser.java:558)
BaseParser可以看到默认的大小是65536,可以根据自己的需求增加系统属性org.apache.pdfbox.baseParser.pushBackSize增加推回缓冲区
嗨,朋友, 既然有缘,何不关注一下!
春有百花秋有月,夏有凉风冬有雪!