I just downloaded Version 1.32 DLLs, and am attempting to write an application in VB.Net that will allow me to password-protect a PDF file.
I was successful in using the supplied VB.Net sample that creates "HelloWorld.pdf", and managed to traslate the C# code from the Wiki that supplies a password for the file. I am using PDFSharp.dll, and have added a reference to it.
However, if I try to use PDFReader.Open(), the compiler does not recognize it, saying that it is not declared. Other functions, like AddPage, OwnerPassword, etc. are all recognized and do their jobs.
Here is the first part of the code...
Code:
Option Strict On
Option Explicit On
Imports PdfSharp
Imports PdfSharp.Drawing
Imports PdfSharp.Pdf
Public Class Form1
Dim document As PdfDocument = New PdfDocument
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Try
document = PdfReader.Open("HelloWorld.pdf")
Catch ex As Exception
Debug.Print(ex.ToString)
End Try