Click here to Skip to main content
12,401,832 members (54,629 online)
   

ASP.NET

 
QuestionBenefits of using of ADO.NET in .NET 4.0. Pin
hiredotnet2-Oct-12 21:48
memberhiredotnet2-Oct-12 21:48 
AnswerRe: Benefits of using of ADO.NET in .NET 4.0. Pin
Richard MacCutchan2-Oct-12 21:58
mvpRichard MacCutchan2-Oct-12 21:58 
AnswerRe: Benefits of using of ADO.NET in .NET 4.0. Pin
somasundarapandian4-Oct-12 4:33
membersomasundarapandian4-Oct-12 4:33 
Questioninfragistics webdatagrid editing problem please help me Pin
sai.20121-Oct-12 13:36
membersai.20121-Oct-12 13:36 
AnswerRe: infragistics webdatagrid editing problem please help me Pin
Sandeep Mewara1-Oct-12 23:14
mvpSandeep Mewara1-Oct-12 23:14 
QuestionButton Click event is not working on specific case. Pin
ayyappakonakalla1-Oct-12 2:54
memberayyappakonakalla1-Oct-12 2:54 
AnswerRe: Button Click event is not working on specific case. Pin
Sandip.Nascar1-Oct-12 22:23
memberSandip.Nascar1-Oct-12 22:23 
QuestionPDF file was demaged Pin
vinothini dharmaraj1-Oct-12 1:13
membervinothini 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
memberEddy Vluggen2-Oct-12 4:51 
Questionconnection string Web.config + ASP.net C# Pin
jojoba20111-Oct-12 0:09
memberjojoba20111-Oct-12 0:09 
AnswerRe: connection string Web.config + ASP.net C# Pin
rock_monu1-Oct-12 0:16
memberrock_monu1-Oct-12 0:16 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20111-Oct-12 0:40
memberjojoba20111-Oct-12 0:40 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan1-Oct-12 1:13
mvpRichard MacCutchan1-Oct-12 1:13 
QuestionRe: connection string Web.config + ASP.net C# Pin
Member 94738091-Oct-12 4:23
memberMember 94738091-Oct-12 4:23 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan1-Oct-12 4:31
mvpRichard MacCutchan1-Oct-12 4:31 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan1-Oct-12 4:33
mvpRichard MacCutchan1-Oct-12 4:33 
QuestionRe: connection string Web.config + ASP.net C# Pin
Member 94738091-Oct-12 7:05
memberMember 94738091-Oct-12 7:05 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan1-Oct-12 7:37
mvpRichard MacCutchan1-Oct-12 7:37 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20111-Oct-12 22:04
memberjojoba20111-Oct-12 22:04 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan2-Oct-12 2:52
mvpRichard MacCutchan2-Oct-12 2:52 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20112-Oct-12 3:04
memberjojoba20112-Oct-12 3:04 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan2-Oct-12 3:26
mvpRichard MacCutchan2-Oct-12 3:26 
QuestionRe: connection string Web.config + ASP.net C# Pin
jojoba20112-Oct-12 6:05
memberjojoba20112-Oct-12 6:05 
AnswerRe: connection string Web.config + ASP.net C# Pin
Richard MacCutchan2-Oct-12 6:39
mvpRichard MacCutchan2-Oct-12 6:39 
AnswerRe: connection string Web.config + ASP.net C# Pin
jkirkerx2-Oct-12 18:00
memberjkirkerx2-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.


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 27 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid