Posts

Showing posts from January 13, 2014

Change logo of a pdf documment in every page

 private void button2_Click(object sender, EventArgs e)         {             String sourceFileName = "D:\\reader2.pdf";             String imageFileName = "D:\\AxaltaByAnil.jpg";             String newFileName = "E:\\" + DateTime.Now.Millisecond + ".pdf";             OpenFileDialog dlg = new OpenFileDialog();             ////string filepath;             dlg.Filter = "PDF Files(*.PDF)|*.PDF|All Files (*.*)|*.*";             if (dlg.ShowDialog() == DialogResult.OK)             {                 sourceFileName = dlg.FileName.ToString();                 InsertImageToPdf(sourceFileName, imageFileName, newFileName);       ...

Convert a pdf document to a txt file word document,

private void button1_Click(object sender, EventArgs e)         {             OpenFileDialog dlg = new OpenFileDialog();             string filepath;             dlg.Filter = "PDF Files(*.PDF)|*.PDF|All Files (*.*)|*.*";             if (dlg.ShowDialog() == DialogResult.OK)             {                 filepath = dlg.FileName.ToString();                 string strtext = string.Empty;                 try                 {                     PdfReader reader = new PdfReader(filepath);                     for (int page = 1; page <= reader.NumberOfPag...