2010-06-27 61 views
1

我想用DOMPDFDOMPDF - 圖像顯示自定義文本使用CSS

<div class="image" style="font-size:25px"> 
    <img alt="" src="image-url.jpg" /> 
    <div class="name" style="margin-top: -575px; margin-right: 0; margin-bottom: 0; margin-left: 235px; position: absolute;"> 
    <font face="High Tower Text"><em><?php print $some-value; ?></em></font> 
</div> 
<div class="current-date" style="margin-top :-510px; margin-right: 0; margin-bottom: 0; margin-left: 235px; position: absolute;"> 
    <font face="High Tower Text"><em><?php print $some-value; ?></em></font> 
    </div> 
</div> 

顯示在圖像上的自定義文本,但是當我嘗試PDF,首先它打印圖像和它打印後打開我正在提供的動態文本。

回答

1

DOMPDF does not supportposition: absolute

發佈了issue,但看起來還沒有添加。

解決方法可能是使用您的文本在GD 中呈現圖像。

+0

感謝alex的快速回復。 – Yogesh 2010-06-27 11:12:35