在使用 dompdf 的 php5 类创建的 pdf 中创建水印

发布于 2024-08-05 15:28:09 字数 83 浏览 2 评论 0原文

是否可以将水印放入 dompdf 的 php5 类生成的 PDF 中?

如果是;我该怎么做?

如果没有;还有别的办法吗?

Is it possible to place a watermark into a PDF generated by the dompdf's php5 class?

If yes; how do I do it?

If no; is there another way?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

壹場煙雨 2024-08-12 15:28:09

如示例 demo_01.html 中所述(在底部页面的)

<script type="text/php">
   $pdf->open_object();
   $w = $pdf->get_width();
   $h = $pdf->get_height();
   $pdf->close_object();
   $pdf->page_text(110, $h - 240, "DELETED", Font_Metrics::get_font("verdana", "bold"),110, array(0.85, 0.85, 0.85), 0, -52);
</script>

这将在您的文档上添加一个大的“DELETED”字符串

As explained in example demo_01.html (at the bottom of the page)

<script type="text/php">
   $pdf->open_object();
   $w = $pdf->get_width();
   $h = $pdf->get_height();
   $pdf->close_object();
   $pdf->page_text(110, $h - 240, "DELETED", Font_Metrics::get_font("verdana", "bold"),110, array(0.85, 0.85, 0.85), 0, -52);
</script>

this will add a big 'DELETED' string over your document

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文