如何使用 JavaScript 使 PDF 不可打印和不可下载

问题描述

我在 odoo ERP 中使用 Muk Documents 插件。但是我想让我的 pdf 文件不可打印和不可下载。代码片段:

updateActions: function () {
this.$actions.empty();
if (this.activePreview) {
if (this.activePreview.downloadable) {
this.$actions.append($("<a>",{
'class': "mk_preview_download",'html': '<i class="fa fa-download" />','title': _t("Download"),'href': this.activeFile.url,}));
            }
            if (this.activePreview.printable) {
                this.$actions.append($("<a>",{
                    'class': "mk_preview_print",'html': '<i class="fa fa-print" />','title': _t("Print"),'href': '#',}));
            }
            _.each(this.activePreview.contentActions(),function(action) {
                this.$actions.append(action);
            },this);
        }

解决方法

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

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

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