We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How can I add DRM to a pdf file?

Hi,

How can I prevent a newly created pdf file from being posted out on the Internet?

Thanks.

@dpreznik

Thanks for contacting support.

I am afraid that adding DRM functionality is currently unavailable. However, a feature request with an ID PDFNET-45461 is logged in our issue tracking system to investigate the feasibility of the feature. As soon as we have some updates regarding feature availability, we will surely inform you. Please be patient and spare us little time.

We are sorry for the inconvenience.

Hi,

Is there any update on this?

Thanks.

@dpreznik

We regret to share that earlier logged ticket is not yet resolved due to other high priority issues in the queue. Please note that issues logged under free support model are resolved/investigated on first come first serve basis unlike paid support option where issues have high precedence. However, we have recorded your concerns and will definitely consider them during ticket investigation. As soon as we have some definite updates to share, we will surely inform you. Please spare us little time.

We are sorry for the inconvenience.

No changes yet?

@dpreznik

We regret to share that earlier logged ticket is not yet resolved due to other high priority issues and implementations to the API. We will definitely let you know as soon as we make significant progress towards ticket resolution. Please spare us some time.

We are sorry for the inconvenience.

Thank you for answering. Maybe there is at least a way to prevent copy/paste of the pdf content?

@dpreznik

You can try setting privileges in PDF document to allow/disallow copying content using DocumentPrivilege Class and setting its respective properties.

Thank you for your answer. But that solution uses password, which I don’t want…
I tried this:
(Here a document is created and populated)
pdfDocument.Save(destFilePath)

        Dim privilege As DocumentPrivilege = DocumentPrivilege.ForbidAll
        privilege.ChangeAllowLevel = 1
        privilege.AllowPrint = True
        Dim fileSecurity As PdfFileSecurity = New PdfFileSecurity()
        fileSecurity.SetPrivilege(privilege)
        fileSecurity.Save(destFilePath)

But on fileSecurity.SetPrivilege(privilege) I get an exception:
Pdf document has not been provided yet or it was closed after changing document security properties.

What is wrong?

@dpreznik

We are afraid you may not be able to manipulate password protected files without using its password. Moreover, the error occurs because a PDF doument is not associated with PdfFileSecurity object. So you may initialize a PDF document first and then use PdfFileSecurity (Document) Constructor or use fileSecurity.BindPdf(Document) method before setting privileges.

1 Like

But why are you talking about password protected files? I don’t want them to be password protected, I only want to prevent copying the content after the file is saved.
Anyway, I applied BindPdf() like you said, and for now I am all set. Thank you.

@dpreznik

It is good to know that your requirements are fulfilled. Please let us know in case of any further assistance.

1 Like