stanav,

I think i found something , i converted it from # to vb

But it is not working , what am i missing here ????

Imports System.IO
Imports iTextSharp.text.pdf
Public Class Form1
Dim WorkingFolder As String = ("C:\NSG\")
Dim InputFile As String = Path.Combine(WorkingFolder, "BM1.pdf")
Dim OutputFile As String = Path.Combine(WorkingFolder, "BM_dec.pdf")
'will be created automatically //You must provide owner password but not the user password.


Private Sub DecryptFile(ByVal inputFile As String, ByVal outputFile As String)

Dim password As String = "1234"
' Your Key Here
Try
Dim reader As New PdfReader(inputFile, New System.Text.ASCIIEncoding().GetBytes(password))

Using memoryStream As New MemoryStream()
Dim stamper As New PdfStamper(reader, memoryStream)
stamper.Close()
reader.Close()
File.WriteAllBytes(outputFile, memoryStream.ToArray())

End Using
Catch err As Exception
'' Console.WriteLine(err.Message)
MsgBox("")
End Try
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
DecryptFile(WorkingFolder, "BM1.pdf")
End Sub
End Class