跳至內容
選單
此問題已被標幟
1 回覆
6246 瀏覽次數

Hi, 

Below is my rml report tag for displaying an image. However, it does not display any image in the pdf. 

<image file="addons/mymodule/report/lightweight.jpg" x="300" y="700" />

I also tried to use the url image path like "http://mydomain.com/images/test.jpg", it looks like may be there is something else missing here?

Any advise on where should I put my image file/s or how to resolve this issue? Thanks.

頭像
捨棄
最佳答案

This bugged me for a while. Your code is correct, but it has to be between <pageGraphics> tags in <pageTemplate>. For example:


<document filename="$foo.pdf">
<template pageSize="(8.5in,11in)" title="$foo" author="$user">
<pageTemplate id="first">
<pageGraphics>
<image file="addons/mymodule/report/lightweight.jpg" x="300" y="700" />
...
</pageGraphics>
...
</pageTemplate>
...


Hope that helps!

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 15
3904
3
3月 15
5070
1
7月 25
1844
1
5月 20
3288
0
3月 20
3253