Click here to Skip to main content
15,906,463 members
Home / Discussions / C#
   

C#

 
AnswerRe: Regex problem Pin
snorkie16-Oct-07 4:57
professionalsnorkie16-Oct-07 4:57 
GeneralRe: Regex problem Pin
laserbaronen16-Oct-07 5:29
laserbaronen16-Oct-07 5:29 
QuestionConsole.KeyAvailable not working for me Pin
indiie16-Oct-07 4:11
indiie16-Oct-07 4:11 
AnswerRe: Console.KeyAvailable not working for me Pin
laserbaronen16-Oct-07 4:27
laserbaronen16-Oct-07 4:27 
QuestionConversion error Pin
Exelioindia16-Oct-07 3:48
Exelioindia16-Oct-07 3:48 
AnswerRe: Conversion error Pin
Andrei Ungureanu16-Oct-07 4:08
Andrei Ungureanu16-Oct-07 4:08 
AnswerRe: Conversion error Pin
Hesham Amin16-Oct-07 4:11
Hesham Amin16-Oct-07 4:11 
Questionmemory stream to pdf writer Pin
k.philip16-Oct-07 3:31
k.philip16-Oct-07 3:31 
hi all;
what i need to do is send a pdf as atachment in mail and before that i also need to secure it with a password , what i need to do is to pass data from memory stream to pdf and then apply password to it and then reconvert it to memory stream and then pass it as attachment
following is the code if u need to check ...
thanks!
byte[] bytes = lr.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);// here im converting the report to pdf format
MemoryStream s = new MemoryStream(bytes);// this puts the report data into the memory stream
s.Seek(0, SeekOrigin.Begin);
Document doc1 = new Document();
//doc1.Open();
PdfWriter p1= PdfWriter.GetInstance(doc1, new FileStream("Chap0101.pdf", FileMode.Create));
PdfWriter.GetInstance(doc1, s);
p1.SetEncryption(PdfWriter.STRENGTH128BITS, "admin", "admin", PdfWriter.AllowPrinting);
//doc1.Close();
Attachment a = new Attachment(s,"example.pdf");
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("kuruvilla.philip@rave-tech.com", "kuruvilla.philip@rave-tech.com", "A report for you!", "Here is a report for you");
message.Attachments.Add(a);
SmtpClient client = new SmtpClient("server");
client.Send(message);


Question[Message Deleted] [modified] Pin
But_Im_a_Lady16-Oct-07 3:28
But_Im_a_Lady16-Oct-07 3:28 
AnswerRe: add a JS Function to a dynamic table created using c# Pin
Andrei Ungureanu16-Oct-07 4:02
Andrei Ungureanu16-Oct-07 4:02 
AnswerRe: add a JS Function to a dynamic table created using c# Pin
Dave Kreskowiak16-Oct-07 4:16
mveDave Kreskowiak16-Oct-07 4:16 
QuestionDTS - Data Transformation Services Pin
mihksoft16-Oct-07 2:26
mihksoft16-Oct-07 2:26 
AnswerRe: DTS - Data Transformation Services Pin
leppie16-Oct-07 2:35
leppie16-Oct-07 2:35 
QuestionGnerate Typed Dataset at runtime Pin
DotNetWWW16-Oct-07 2:02
DotNetWWW16-Oct-07 2:02 
AnswerRe: Gnerate Typed Dataset at runtime Pin
leppie16-Oct-07 2:30
leppie16-Oct-07 2:30 
QuestionEmpty rows get loaded while Parsing CSV Pin
jebin k16-Oct-07 1:57
jebin k16-Oct-07 1:57 
AnswerRe: Empty rows get loaded while Parsing CSV Pin
leppie16-Oct-07 2:33
leppie16-Oct-07 2:33 
GeneralRe: Empty rows get loaded while Parsing CSV Pin
jebin k16-Oct-07 2:44
jebin k16-Oct-07 2:44 
GeneralRe: Empty rows get loaded while Parsing CSV Pin
leppie16-Oct-07 2:58
leppie16-Oct-07 2:58 
AnswerRe: Empty rows get loaded while Parsing CSV Pin
kubben16-Oct-07 3:23
kubben16-Oct-07 3:23 
Questionunmanaged callback (for dll interaction) Pin
Pixinger7716-Oct-07 1:50
Pixinger7716-Oct-07 1:50 
AnswerRe: unmanaged callback (for dll interaction) Pin
TJoe16-Oct-07 2:25
TJoe16-Oct-07 2:25 
QuestionCapturing Live video Pin
capones16-Oct-07 1:41
capones16-Oct-07 1:41 
AnswerRe: Capturing Live video Pin
Christian Graus16-Oct-07 1:50
protectorChristian Graus16-Oct-07 1:50 
QuestionHow to refresh my Form Pin
gizmokaka16-Oct-07 1:06
gizmokaka16-Oct-07 1:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.