pdf-generation - Apache FOP : zindex does not appear to be working in overlapping blocks

标签 pdf-generation xsl-fo apache-fop

我是 FOP 新手。我正在尝试使用块容器和 zindexes 在图像顶部显示文本。图像总是在顶部。如果我删除图像,我可以看到文字,所以文字在图像下方。

这是在表格单元格内。这是相关代码:

<fo:table-cell padding="0.000pt" text-align="left" display-align="before">
                <fo:block>
                  <fo:block-container z-index="2" position="absolute" left="0.913in" top="0.139in" width="0.946in" height="0.198in" overflow="hidden">
                    <fo:block><fo:inline font-family="Verdana" font-size="8pt">Leasure Station</fo:inline></fo:block>
                  </fo:block-container>

                  <fo:block-container z-index="2" position="absolute" left="0.091in" top="0.431in" width="0.302in" height="0.239in" overflow="hidden">
                    <fo:block><fo:inline font-family="Verdana" font-size="8pt">#1</fo:inline></fo:block>
                  </fo:block-container>

                  <fo:block-container z-index="2" position="absolute" left="0.653in" top="0.431in" width="1.186in" height="0.177in" overflow="hidden">
                    <fo:block><fo:inline font-family="Verdana" font-size="8pt">ASDF1234QWER</fo:inline></fo:block>
                  </fo:block-container>

                  <fo:block-container z-index="1" position="absolute" left="0in" top="0in" width="48.5mm" height="20mm" overflow="hidden">
                    <fo:block><fo:external-graphic src="url(.\fop-1.0\img\orange_s_text.png)" content-width="48.500mm" scaling="non-uniform" content-height="20.000mm"/></fo:block>
                  </fo:block-container>
                </fo:block>
              </fo:table-cell>

最佳答案

在所有 zindex=2 块之前移动索引为 1 的块并且它起作用了。任何。

关于pdf-generation - Apache FOP : zindex does not appear to be working in overlapping blocks,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3745984/

相关文章:

xslt - 如何在不扩大行高的情况下在段落的第一行生成首字母?

pdf-generation - 将文本添加到使用 itextsharp 关闭的现有 pdf

php - 是否可以使用 Google Docs API 将文本字符串转换为 PDF

html - "Continued on next page"在 xsl 分页处

c# - 处理 xsl fo 中的像素

java - 将嵌套 XML 文件解析为节点集

xml - 将封面插入 XSL :FO template

ios - 如何使用 Monotouch 或 Xcode 4.2 对 PDF 文件进行数字签名?

html - 从 IE/Delphi 打印具有忠实 CSS 格式的 HTML?

java - Apache FOP - Fop 类型的 getDefaultHandler() 方法未定义