iText -PDF阅读问题的标题级别(h1 - h6) [英] iText -PDF reading issue on heading levels ( h1 - h6 )

查看:263
本文介绍了iText -PDF阅读问题的标题级别(h1 - h6)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由iText-XMLWorker 5.5.4生成PDF。除了屏幕阅读器中的标题级别(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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆