iText -PDF阅读问题的标题级别(h1 - h6) [英] iText -PDF reading issue on heading levels ( h1 - h6 )
问题描述
下面的代码在浏览器上工作正常,但不在PDF中。
< section>
< h1>标题1< / h1>
< h2>标题2< / h2>
< h3>标题3< / h3>
< h4>标题4< / h4>
< / section>
请看 ParseHeaders
示例。它采用 headers.html 页面,标题来自 < h1>
到< h2>
并将其转换为 headers.pdf :
在你的问题中,你声称除了标题级别(h1-h6)外, ,但你不解释什么是不工作。请详细说明。如屏幕截图所示,PDF看起来不错,不是吗?你能解释一下PDF有什么问题吗?你能告诉我们你的代码吗?
Generated PDF by iText-XMLWorker 5.5.4. Everything is reading perfectly except heading levels (h1-h6) in screen reader.
Below code works fine on browsers but not in PDF.
<section>
<h1>heading 1</h1>
<h2>heading 2 </h2>
<h3>heading 3 </h3>
<h4>heading 4 </h4>
</section>
Please take a look at the ParseHeaders
example. It takes the headers.html page with headers from <h1>
to <h2>
and converts it to headers.pdf:
In your question, you claim that everything is working perfectly except heading levels (h1-h6), but you don't explain what isn't working. Please elaborate. As shown in the screen shot, the PDF looks OK, doesn't it? Can you explain what is wrong with the PDF? Can you show us your code?
这篇关于iText -PDF阅读问题的标题级别(h1 - h6)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!