This is a migrated thread and some comments may be shown as answers.

PDF Export disable copy paste from within PDF

3 Answers 246 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 09 Mar 2021, 11:01 AM

Hello,

I created an invoice template with the standalone report designer and I am able to programmatically export a pdf file.

Is it possible to disable copy / paste functionality in the created pdf file programmatically.

Best regards,

Alex

3 Answers, 1 is accepted

Sort by
0
Alexander
Top achievements
Rank 1
answered on 10 Mar 2021, 08:48 AM

I see that it is possible to disable copy paste by setting the deviceInfo OwnerPassword. Unfortunately this also disables printing. 

Is disabling copy paste and enabling printing possible?

Hashtable deviceInfo = new Hashtable{
 ["OwnerPassword"] = new Guid()
 };
0
Todor
Telerik team
answered on 12 Mar 2021, 08:10 AM

Hi Alex,

You may test to include Adobe JavaScript in the deviceInfo that allows printing - PDF Device Information Settings.

Here is a reference to the JavaScript for Acrobat API Reference. For example, on page 283-284 you may find encryptForRecipients - Permissions object. You may try to set allowContentExtraction=false and allowPrinting=highQuality.

Regards,
Todor
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Objectway Financial Software
Top achievements
Rank 1
commented on 20 Apr 2022, 03:18 PM

Hi there,

any news on these?

Is it possible to disable copy/paste in the generated pdf file without disabling print?

Anybody succeeded in using deviceinfo javascript property to do this?

Regards, Maurizio

Dimitar
Telerik team
commented on 25 Apr 2022, 11:48 AM

Currently, the JS workaround that my colleague Todor has suggested is the only way to disable the copy/paste without also disabling printing.

Note however that the code example seems to actually be on page 286 - JavaScript for Acrobat API Reference.

0
Alexander
Top achievements
Rank 1
answered on 12 Mar 2021, 08:52 AM
Interesting stuff! I will post a possible solution, once ready. Thanks for the pointers.
Tags
Report Designer (standalone)
Asked by
Alexander
Top achievements
Rank 1
Answers by
Alexander
Top achievements
Rank 1
Todor
Telerik team
Share this question
or