Click here to Skip to main content
14,240,831 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi I am a newbie and I am trying to write my own pdf display application.
I have couple of pdf's that I want to show to a client on his pc in my reader (display application) but he must not be able to print /save/save as etc...
I am using visual studio 2015 C# windows application.
I am aware of the adobe active X control but it still has a "bar" that gives the user a way to copy print etc...
I am not interested in more than displaying the file - nothing fancy.
I'm afraid I have stuck my head in a beehive but being stubborn I refuse to admit defeat...
Any help will be sorely appreciated
Standing on knees and getting teary eyed now...

What I have tried:

I have looked at Sumatra/Adobe/itextsharp
Posted
Updated 27-Apr-17 18:46pm
Comments
Member 13152980 27-Apr-17 12:30pm
   
Hi Jacky, the price on it is a bit steep I think. they do have a free version that is limited to 10 pages of PDF when viewing and printing PDF files.
I is not going to help... thank you anyway.
David_Wimbley 27-Apr-17 2:34am
   
Are you willing to take the pages of your PDF and convert them to images then showing the images? If so i can provide an example.
Member 13152980 27-Apr-17 12:11pm
   
Hi David, that would be most kind sir...

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Take a look at GitHub - jhabjan/Ghostscript.NET: Ghostscript.NET - managed wrapper around the Ghostscript library (32-bit & 64-bit)[^]

This is a library that i mentioned that I used for converting pages of a PDF to images, then using those images to display the document in an MVC application. It looks like the link i provided may be a better option however the method I utilized is found here:

A Simple C# Wrapper for Ghostscript » matthew ephraim's blog[^]

This method is dependent upon having gsdll32.dll in your /bin directory otherwise you'll get run-time errors. The call to converting your PDF to images is the following void GeneratePageThumb(string inputPath, string outputPath, int page, int dpix, int dpiy, int width = 0, int height = 0)

The idea here that you pass in the PDF you want to convert and it will output (outputPath) all the images that were generated from your PDF.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100