- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
有没有办法阻止接收者在dompdf中选择和复制pdf文件的内容?
像其他pdf文件一样,打开后是图片,所有的字母和图片都无法选择?
最佳答案
您可以使用底层 CPDF 引擎来指定用户可以对文档执行的操作。根据 CPDF 文档:
Calling [the setEncryption()] function sets up the document to be encrypted, this is the only way to mark the document so that they user cannot use cut and paste, or printing.
Using the call without options, defaults to preventing the user from cut & paste or printing. There are no passwords require to open the document.
Setting either off the passwords will mean that the user will have to enter a password to open the document. If the owner password is entered when the document is opened then the user will be able to print etc. If the two passwords are set to be the same (or the owner password is left blank) then there is no owner password, and the document cannot be opened in the accesible mode.
The pc array can be used to allow specific actions. The following example, sets an owner password, a user password, and allows printing and cut & paste.
$pdf->setEncryption('trees','frogs',array('copy','print'));
使用上面的示例,您将首先使用 dompdf 呈现文档,然后按照以下行发出一些内容:
$dompdf->get_canvas()->get_cpdf()->setEncryption('trees','frogs',array('copy','print'));
关于php - 防止复制使用 dompdf 创建的 pdf 中的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12190294/
我正在尝试使用 dompdf 生成 pdf,如何在浏览器的新选项卡中打开 pdf?就像,我单击 PDF 的链接,它应该在新选项卡中打开,而不是自动保存。我想让用户在第一次看到文件后选择保存文件。我怎么
我的 DOMPDF 有问题。 我正在尝试使用 DOMPDF 生成一个表格。 错误信息: The row #1 could not be found 完整的错误报告: > Fatal error
我将 DOMPDF 与 Laravel-dompdf 一起使用,经过数小时的研究后,我找不到能够渲染我的图像的解决方案。我已经提到了这些问题: DomPDF: Image not readable o
我在laravel 5.5和bootstrap css中使用barryvdh/laravel-dompdf(通过小的调整重命名为pdf.css)以pdf格式生成报告 这是我从报告 View 中调用 c
当使用自定义字体生成我的 PDF 并尝试像这样流式传输时:$pdf = PDF::loadView( '/pdfs/invoice',$data); return $pdf->stream();本地环
我正在使用 Bamboo invoice 作为发票生成器,我正在尝试自定义发票模板,但无论我做什么,字体似乎都无法调整。 目前我有 body { margin: 0.5in; font-family:
在 HTML 中形成的表 3 。每张纸都是一张 table 。我们需要一些东西来转换为 pdf,最后一片叶子在风景中!使用肖像它可以工作,以及如何制作相册的其中一张......我不明白...... 最
我有成功的 html 到 pdf 转换,但没有特殊字符。 下面只是我试图显示的一个特殊字符,当我将它简单地放在一个 html 文档中时,它会显示在我的 Mac 上的浏览器中。 (但不是在我的 wi
我目前正在尝试使用 Wordpress 和(最新版本的)dompdf,遇到了一个关于格式的恼人问题。 我的问题:生成的第二页似乎没有考虑主要内容的上边距,导致与我的 Logo 重叠。您可以查看生成的
我目前正在尝试使用 Wordpress 和(最新版本的)dompdf,遇到了一个关于格式的恼人问题。 我的问题:生成的第二页似乎没有考虑主要内容的上边距,导致与我的 Logo 重叠。您可以查看生成的
我尝试使用 dom pdf 创建价格标签。价格标签由一些 div 容器组成。其中一个容器具有最大高度,但这不起作用。因为如果我将此容器的文本更改为包含 200 个单词而不是 100 个单词的文本,则价
我正在安装 dompdf http://code.google.com/p/dompdf/ 一切顺利,但安装说明告诉我“编辑 dompdf_config.custom.inc.php(0.6 版)或
我正在使用 barryvdh/laravel-dompdf 包,我想创建一个可打印的页面。这是我的代码: $pdf = App::make('dompdf.wrapper'); $pdf->s
我在最新版本的 DOMPDF (0.6.0 Beta 3) 中遇到了一个非常奇怪的问题。我正在使用它为我网站上的客户创建发票。该设计要求表格单元格之间的边框为 1px。如果我使用黑色或 #000 作为
我正在尝试使用 Dompdf 从 html 文件生成漂亮的 pdf,但我无法画线 在每一页上。这是 php 文件的示例。 load_html($html); $dompdf->render(); $
我正在使用dompdf生成PDF。我已经从dompdf网站上获取了代码,将标题添加到pdf,并且可以使用,但是我想将标题放置在除第一页之外的所有页面上。有什么建议么? 最佳答案 您可以通过在第一页中出
我在 http://dompdf.github.com/ 上使用 DOMPDF 我正在努力如何设置整个页面的字体。在我制作的模板中,我在 CSS 中将字体设置为 Helvetica,但是当它生成 PD
使用的技术: PHP: v7.4 SilverStripe: v4.7 DomPDF: 1.0 在发布此内容之前,我确保能够遵循与此 DomPDF 相关的其他提示和文章,但未显示包含的图像,但图像仍然
我试图让表格在 DOMPDF 中 float 。我正在使用最新版本的 DOMPDF 0.6.0 beta2。在 dompdf_config.inc.php 中,我将 DOMPDF_ENABLE_CSS
我是 DOMPDF 的新手,我正在尝试使用 dompdf 将我表中未归档的所有记录打印为 pdf。这是以 pdf 格式打印 html 的代码。 table { font-family: ar
我是一名优秀的程序员,十分优秀!