Using iText, how can I apply css to my PDF document using CssResolver and CssFile?

前端 未结 4 2410
滥情空心
滥情空心 2021-02-20 14:00

Thanks for your help...

Problem

While converting an html table tag/snippet (which I have converted to string) into a PDF document...

I am able to

4条回答
  •  南笙
    南笙 (楼主)
    2021-02-20 14:28

    I think a better and more powerful (and higher level of abstraction) tool for this purpose (generating PDF files from XHTML) would be Flying Saucer, aka. xhmlrenderer.

    It gives complete CSS2 support and a few CSS3 properties for print media, and you can extend it to render any PDF's (see the ReplacementElementFactory API).

    I've used it to render dynamic PDF reports (with freemarker), with custom tags, like . Very simple tool and easy to understand.

    See: http://code.google.com/p/flying-saucer/

    The user guide can be found here: http://flyingsaucerproject.github.com/flyingsaucer/r8/guide/users-guide-R8.html

提交回复
热议问题