Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I use pdfcrowd to convert html to pdf
Collapse | Copy Code
string[] getval= new string{"1","2"};
I generate html code from foreach, so if foreach runs 2 times, i want to show both html code in different page in same pdf
Collapse | Copy Code
foreach(string val in getval)
{

forpdf=forpdf+"
NEw cvalue is
"+val.ToString()+"";

}

pdfcrowd.Client client = new pdfcrowd.Client("addgvsv", "bvabval753766");

MemoryStream Stream = new MemoryStream();
client.convertHtml(forpdf,Stream);


Response.AddHeader("Content-Disposition", "attachment; filename=Itinerary_1.pdf");
So , in generated pdf (Itinerary_1.pdf), there it should show in 1st page as

NEw cvalue is 1

in 2nd page , in same pdf ,

NEw cvalue is 2


pls advice
Posted

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