Hello,
I am using a XML and XSLT to render a HTML page.
My problem is that based on the input that the user selects different values are put into the XML and the HTML is the same (i.e. format) but displayed with different values. I am trying to create a print all button where I will loop through all the xml documents, render the html using the XSLT page and then send the html right to the printer. Also I want this all done on the server.
Here is some of the code I use:
// Get the transformed result from xml to html
StringWriter sw = new StringWriter();
xslt.Transform(doc, null, sw, null);
//hold the html
string result = sw.ToString();
The "result" string holds the html. Is there anyway to send this to the printer so that it knows that this is an html document and print it as a formatted html document? Again I want to do this all on the server.
Hopefully this is clear, let me know if more detail is required. Any help would be greatly appreciated. Thank you.
I am using a XML and XSLT to render a HTML page.
My problem is that based on the input that the user selects different values are put into the XML and the HTML is the same (i.e. format) but displayed with different values. I am trying to create a print all button where I will loop through all the xml documents, render the html using the XSLT page and then send the html right to the printer. Also I want this all done on the server.
Here is some of the code I use:
// Get the transformed result from xml to html
StringWriter sw = new StringWriter();
xslt.Transform(doc, null, sw, null);
//hold the html
string result = sw.ToString();
The "result" string holds the html. Is there anyway to send this to the printer so that it knows that this is an html document and print it as a formatted html document? Again I want to do this all on the server.
Hopefully this is clear, let me know if more detail is required. Any help would be greatly appreciated. Thank you.