Dim enc As System.Text.Encoding = System.Text.Encoding.ASCII
Dim myByteArray As Byte() = enc.GetBytes("0123")
Dim pdfReader As PdfReader = New PdfReader(pdfTemplate, myByteArray)

try this, should work for you.




grle wrote:
> 
> Hello
> 
> I am programming in Visual Studio .Net with iTextSharp  an i have a
> problem
> 
> I create  Pdf with   Owner Password  :  "0123"
> 
> when i try to open them, i use this code :
> 
> ------------------------------------------------
> Dim MyBytes() As Byte
> 
> MyBytes = System.Text.Encoding.Unicode.GetBytes("0123")
> reader = New iTextSharp.text.pdf.PdfReader(MyPdf, MyBytes)
> -------------------------------------------------
> 
> but I have a Bad password error 
> I try with  System.Text.Encoding.ASCII and UTF but with the same error
> 
> HELP PLEASE !
> 
> 

-- 
View this message in context: 
http://www.nabble.com/iTextSharp-pdf-owner-Password-tp21662464p24769533.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to