XSL-FO 中的圆角 [英] Rounded corners in XSL-FO

查看:42
本文介绍了XSL-FO 中的圆角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们客户的要求是提供带圆角的 PDF 表格.我只有 Apache FOP 处理器可供我使用,它不支持圆角属性.它也不支持浮动,因此无法实现左右浮动圆形图像.

Our client's request is to have tables in PDF with rounded corner. I only have Apache FOP processor at my disposal and it doesn't support the rounded corner attribute. It also doesn't support floats, so floating rounded images to left and to right cannot be done.

您对如何执行此操作有任何建议吗?

Do you have any suggestions on how to do this?

推荐答案

您可以将表格创建为可缩放矢量图形 (SVG) 对象,并将其作为外部图像包含在您的 XSL-FO 文档中.SVG 支持圆角,FOP 支持 SVG.

You can create the table as a Scalable Vector Graphics(SVG) object, and include that as an external-image in your XSL-FO document. SVG supports rounded corners, and FOP supports SVG.

我相信您也可以创建一个圆角矩形 SVG 并将其用作内容的背景,然后将表格放在它的前面.我想我做过一次,但我似乎无法找到代码...

I believe you can also just create a rounded rectangle SVG and use that as a background to your content, and put the table in front of it. I think I did this once, but I cannot seem to locate the code...

这篇关于XSL-FO 中的圆角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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