Stop copy/paste - protect pdf documents

Technical support for Spire.Doc

Moderator: iceblue support

Stop copy/paste - protect pdf documents

Postby fatmedia » Wed Jan 25, 2012 11:15 am

Hi there, we bought the spire.doc system from you a few months ago, we now need to also stop copying & pasting and apply a high level protection to the the PDFs we generate.

I honestly thought the spire.doc system let you do that, but upon reading these forums have discovered that it doesnt.

We already have our entire solution written & built, the pdfs are generated from docx template files, have several large blocks ot text inserted & altered and inserts several images. We then convert this document in memory into a pdf using your software and then stream it direct to the user. We do not save copies of it.

We cannot alter the way this works as it would involve too much work. We simply want to take our exisitng pdf memory stream and apply protection to it.

Can you please tell me exactly what i need to do/buy so i can solve the above problem?

Posts: 13
Joined: Fri Oct 07, 2011 2:31 pm

Re: Stop copy/paste - protect pdf documents

Postby Suvi.Wu » Thu Jan 26, 2012 10:03 am

Hello fatmedia,

Thank you for your inquiry.
You can enhance the security of your pdf document via setting the password or the PdfPermissionsFlags. For example: your pdf document' s name is pdfDoc, you can use the following code:
pdfDoc.Security.Permissions = PdfPermissionsFlags.Print;
pdfDoc.Security.KeySize = PdfEncryptionKeySize.Key128Bit;
pdfDoc.Security.OwnerPassword = "test";
pdfDoc.Security.UserPassword = "test";
Then stream it to your client. And this all codes need Spire.Pdf,so you need to buy Spire.Pdf to achieve your purpose.

Have a great day.

e-iceblue support
User avatar
Posts: 156
Joined: Thu Oct 20, 2011 2:53 am

Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests