Click here to Skip to main content
15,793,018 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my windows Form application I have one text box in which i need to enter proper HTML tag and now I need to load data in text box into a XML reader then I need to process each element recursively.After this I have to generate a PDF file which contains for example like if i entered
, tags the PDF should contain a table format and an image.I am very new to programming can any help me to do this application

What I have tried:

Created A class
namespace PDFfile
public class Information
private string data1;
public string textBox1
get { return data1; }

created another class like below

public class SaveXml
public static void SaveData(object obj, string filename)
XmlSerializer sr =new XmlSerializer(obj.GetType());
TextWriter write = new StreamWriter(filename);
sr.Serialize(write, obj);

code in form1.cs
private void textBox1_TextChanged(object sender, EventArgs e)


private void button1_Click(object sender, EventArgs e)
var a = textBox1.Focus();
Information info = new Information();
info.textBox1 = textBox1.Text;
SaveXml.SaveData(info, "data.xml");
Updated 2-Jul-17 22:29pm

1 solution

Take a look at "PDF File Writer C# Class Library" PDF File Writer C# Class Library (Version 1.19.1 Enhancement: Document links)[^]
And: "Creating PDF documents from XML": Creating PDF documents from XML[^]
Example on GitHub: Example of generating PDF documents[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900