报告中的斑点图像 header

Blob image at Report header

我试图在报告 header(RTF 模板)中实现动态图像(blob),但无法使用以下方法完成。

 <fo:instream-foreign-object content-type="image/jpg" xdofo:alt="An Image" >
 <xsl:value-of select=".//DLR_IMG"/></fo:instream-foreign-object>

谁能body指导我?

我得到了这个问题的简单解决方案 我们需要在 RTF body 中创建子模板并在 header 部分

中调用它
<?template:Header_IMG?>

<fo:instream-foreign-object content-type="image/jpg" xdofo:alt="An Image" >
<xsl:value-of select=".//DLR_IMG"/></fo:instream-foreign-object> 
(as field code )

<?end template?>

模板调用在 header/footer

<?call-template:Header_IMG?> 

如果您的 XML 文件包含已作为 BLOB 存储在 数据库,在模板中插入的表单字段中使用以下语法,您希望在运行时呈现图像:

<fo:instream-foreign-object content-type=”image/jpg” height="4 in" width="4 in"><xsl:value-of select=”.//IMAGE”/></fo:instream-foreign-object>

哪里

  1. image/jpg 是图像的 MIME 类型(其他选项可能是:image/gif 和 image/png)
  2. IMAGE 是您的 XML 数据中 BLOB 的元素名称。
  3. 表单域 - 需要了解将表单域添加到 MS Word 文档(https://wiki.smartsimple.com/wiki/Adding_Form_Fields_to_a_MS_Word_Document)

code to place form field in msword document