Click here to Skip to main content
15,885,881 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionBenefits of using of ADO.NET in .NET 4.0. Pin
hiredotnet2-Oct-12 21:48
hiredotnet2-Oct-12 21:48 
AnswerRe: Benefits of using of ADO.NET in .NET 4.0. Pin
Richard MacCutchan2-Oct-12 21:58
mveRichard MacCutchan2-Oct-12 21:58 
AnswerRe: Benefits of using of ADO.NET in .NET 4.0. Pin
somasundarapandian4-Oct-12 4:33
somasundarapandian4-Oct-12 4:33 
Questioninfragistics webdatagrid editing problem please help me Pin
sai.20121-Oct-12 13:36
sai.20121-Oct-12 13:36 
AnswerRe: infragistics webdatagrid editing problem please help me Pin
Sandeep Mewara1-Oct-12 23:14
mveSandeep Mewara1-Oct-12 23:14 
QuestionButton Click event is not working on specific case. Pin
ayyappakonakalla1-Oct-12 2:54
ayyappakonakalla1-Oct-12 2:54 
AnswerRe: Button Click event is not working on specific case. Pin
Sandip.Nascar1-Oct-12 22:23
Sandip.Nascar1-Oct-12 22:23 
QuestionPDF file was demaged Pin
vinothini dharmaraj1-Oct-12 1:13
vinothini dharmaraj1-Oct-12 1:13 
Hi, i need to open HTML file into pdf. i'm creating HTML file using String Builder then i will convert that into PDF using HTMLWorker, PDF writer. Here i can open file from my local but once i open from server then i can't open its showing pdf file was demaged.

Here is my code to convert pdf

//Pdfbuilder is string builder

string strPdfContent = Pdfbuilder.ToString();



Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=AboDetails.pdf");

Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringReader reader = new StringReader(strPdfContent);
Document doc = new Document(PageSize.A4, 10, 10, 0, 0);

HTMLWorker parser = new HTMLWorker(doc);
PdfWriter.GetInstance(doc, Response.OutputStream);
//PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(AboDetails.pdf, FileMode.Create));


doc.Open();
try
{

parser.Parse(reader);

Response.Write(doc);
Response.End();
}
catch (Exception ex)
{

}
finally
{
doc.Close();
}


Please its very urgent. If anyone knows the solutions please help me.

awaiting for your reply.

Regards,
Vinothini Dharmaraj.
AnswerRe: PDF file was demaged Pin
Eddy Vluggen2-Oct-12 4:51
professionalEddy Vluggen2-Oct-12 4:51 
Questionconnection string Web.config + ASP.net C# Pin
jojoba20111-Oct-12 0:09
jojoba20111-Oct-12 0:09 
AnswerRe: connection string Web.config + ASP.net C# Pin
rock_monu1-Oct-12 0:16
rock_monu1-Oct-12 0:16 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20111-Oct-12 0:40
jojoba20111-Oct-12 0:40 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan1-Oct-12 1:13
mveRichard MacCutchan1-Oct-12 1:13 
QuestionRe: connection string Web.config + ASP.net C# Pin
Member 94738091-Oct-12 4:23
Member 94738091-Oct-12 4:23 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan1-Oct-12 4:31
mveRichard MacCutchan1-Oct-12 4:31 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan1-Oct-12 4:33
mveRichard MacCutchan1-Oct-12 4:33 
QuestionRe: connection string Web.config + ASP.net C# Pin
Member 94738091-Oct-12 7:05
Member 94738091-Oct-12 7:05 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan1-Oct-12 7:37
mveRichard MacCutchan1-Oct-12 7:37 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20111-Oct-12 22:04
jojoba20111-Oct-12 22:04 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan2-Oct-12 2:52
mveRichard MacCutchan2-Oct-12 2:52 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20112-Oct-12 3:04
jojoba20112-Oct-12 3:04 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan2-Oct-12 3:26
mveRichard MacCutchan2-Oct-12 3:26 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20112-Oct-12 6:05
jojoba20112-Oct-12 6:05 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan2-Oct-12 6:39
mveRichard MacCutchan2-Oct-12 6:39 
AnswerRe: connection string Web.config + ASP.net C# Pin
jkirkerx2-Oct-12 18:00
professionaljkirkerx2-Oct-12 18:00 

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.