在 PDF 中使用 FPDF 将水印文本放置在像素位置 (x,y)

问题描述

我想在 x,y 位置使用 FPDF 将水印文本放置在 PDF 中,但在特定像素处,例如距顶部 30 像素和距左侧 20 像素,而不是函数提供的 x,y 位置

$this->RotatedText(35,190,'W a t e r m a r k   d e m o',45); //here 35,190 are positions for x & y but have no idea what they will be at pixels.

function RotatedText($x,$y,$txt,$angle)
{
    //Text rotated around its origin
    $this->Rotate($angle,$x,$y);
    $this->Text($x,$txt);
    $this->Rotate(0);
}

让我知道是否有办法将像素转换为相应的 x,y 位置。任何想法将不胜感激

参考:http://www.fpdf.org/en/script/script9.php

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)