Control PDF Viewer (Saving & Print)

Posted by Donomar under ASP.NET on 10/19/2015 | Points: 10 | Views : 1282 | Status : [Member] | Replies : 2
Hello guys, I have some important PDFs to be displayed on webpages, but i want to control it by allowing particular users to save and print. How can i get this ?




Responses

Posted by: Sheonarayan on: 10/19/2015 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Here is an article that describe how to generate a .pdf using iTextSharp (a third party free .dll). http://www.dotnetfunda.com/articles/show/977/pdf-generator-in-net-dynamically-generate-pdf-in-aspnet

In this article, we have GenerateOnlyPDF, GeneratePDFAndDownload, and GeneratePDFWithText methods. In these methods, check for that particular user and then only call GeneratePDF method. If for that particular user you do not want to generate .pdf, show an error message.

Hope this helps.


Regards,
Sheo Narayan
http://www.dotnetfunda.com

Donomar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rghotra on: 10/29/2015 [Member] Starter | Points: 25

Up
0
Down
If you want to restrict the PDF view to certain users, I think its something that will require a database for users and each each user will have his own permissions. Based on the permissions, the PDF settings will be set. Is that what you need?
If you want to set a PDF file specific options to disable editing or printing, I think “Sheonarayan” link is a good start. I used leadtools sdk that allowed me to set the PDF options using PdfDocumentOptions & PDFInitialViewOptions classes.


Donomar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response