Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6366 มุมมอง

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!

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Additional picture in corporate header แก้ไขแล้ว
1
มี.ค. 15
4009
Place image in body of report แก้ไขแล้ว
3
มี.ค. 15
5156
Best product image size and resolution? แก้ไขแล้ว
1
ก.ค. 25
2016
1
พ.ค. 20
3405
0
มี.ค. 20
3418