Click here to Skip to main content
15,914,943 members
Home / Discussions / C#
   

C#

 
AnswerRe: Place Form windows at certain position in MDI Application Pin
paas21-Feb-09 5:28
paas21-Feb-09 5:28 
QuestionHow determine redirect url Pin
Meysam Mahfouzi21-Feb-09 1:31
Meysam Mahfouzi21-Feb-09 1:31 
QuestionGenerate WM_DROPFILES and send it to a Control Pin
steffen_dec21-Feb-09 0:24
steffen_dec21-Feb-09 0:24 
AnswerRe: Generate WM_DROPFILES and send it to a Control Pin
pipicato18-Oct-11 23:48
pipicato18-Oct-11 23:48 
AnswerRe: Generate WM_DROPFILES and send it to a Control Pin
davidcole30-Sep-13 5:59
davidcole30-Sep-13 5:59 
QuestionEncoding issue Pin
George_George21-Feb-09 0:19
George_George21-Feb-09 0:19 
QuestionSome Question Pin
E_Gold20-Feb-09 23:28
E_Gold20-Feb-09 23:28 
AnswerRe: Some Question Pin
kevinuni17-Oct-16 11:05
kevinuni17-Oct-16 11:05 
Short Answer: PdfWriter

C#
string path = Path.GetTempPath() + Path.GetRandomFileName() + ".pdf";

            PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(path, FileMode.Create));
            document.Open();
            document.Add(new Paragraph("Karaoke Go!"));


            iTextSharp.text.Font font5 = iTextSharp.text.FontFactory.GetFont(FontFactory.HELVETICA, 9);

            PdfPTable table = new PdfPTable(dt.Columns.Count);
            PdfPRow row = null;
            float[] widths = new float[] { 6f, 6f, 1f };

            table.SetWidths(widths);

            table.WidthPercentage = 100;
            int iCol = 0;
            string colname = "";
            PdfPCell cell = new PdfPCell(new Phrase("Karaoke Go"));

            cell.Colspan = dt.Columns.Count;

            foreach (DataColumn c in dt.Columns)
            {

                table.AddCell(new Phrase(c.ColumnName, font5));
            }

            foreach (DataRow r in dt.Rows)
            {
                if (dt.Rows.Count > 0)
                {
                    table.AddCell(new Phrase(r[0].ToString(), font5));
                    table.AddCell(new Phrase(r[1].ToString(), font5));
                    table.AddCell(new Phrase(r[2].ToString(), font5));
                }
            } document.Add(table);
            document.Close();

            System.Diagnostics.Process.Start(path);


Cheers
GeneralRe: Some Question Pin
kevinuni17-Oct-16 11:08
kevinuni17-Oct-16 11:08 
QuestionClass Pin
mrithula820-Feb-09 22:49
mrithula820-Feb-09 22:49 
AnswerRe: Class Pin
harold aptroot20-Feb-09 22:59
harold aptroot20-Feb-09 22:59 
GeneralRe: Class Pin
Zoltan Balazs21-Feb-09 4:52
Zoltan Balazs21-Feb-09 4:52 
GeneralRe: Class Pin
harold aptroot21-Feb-09 4:58
harold aptroot21-Feb-09 4:58 
GeneralRe: Class Pin
Zoltan Balazs21-Feb-09 5:08
Zoltan Balazs21-Feb-09 5:08 
AnswerRe: Class Pin
Zoltan Balazs21-Feb-09 4:53
Zoltan Balazs21-Feb-09 4:53 
Questionneed help with windows application Pin
balukk20-Feb-09 22:45
balukk20-Feb-09 22:45 
AnswerRe: need help with windows application Pin
Deresen21-Feb-09 3:11
Deresen21-Feb-09 3:11 
AnswerRe: need help with windows application Pin
balukk21-Feb-09 3:56
balukk21-Feb-09 3:56 
GeneralRe: need help with windows application Pin
Deresen22-Feb-09 2:23
Deresen22-Feb-09 2:23 
GeneralRe: need help with windows application Pin
balukk23-Feb-09 5:44
balukk23-Feb-09 5:44 
QuestionWrite into Stream Pin
Abdul Rahman Hamidy20-Feb-09 22:21
Abdul Rahman Hamidy20-Feb-09 22:21 
Questioncrystal reports Pin
sritha20-Feb-09 22:19
sritha20-Feb-09 22:19 
QuestionTo Create Property or Method For another indexer property i write??? Pin
thrashead20-Feb-09 21:45
thrashead20-Feb-09 21:45 
QuestionUnsafe Code + GetEnumerator() [modified] Pin
grzesio191220-Feb-09 21:24
grzesio191220-Feb-09 21:24 
Questionwindoes live id / hotmail authentication in c# windows application Pin
techismart20-Feb-09 19:22
techismart20-Feb-09 19:22 

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.