Click here to Skip to main content
   

ASP.NET

 
QuestionBenefits of using of ADO.NET in .NET 4.0. Pinmemberhiredotnet2-Oct-12 22:48 
AnswerRe: Benefits of using of ADO.NET in .NET 4.0. PinmvpRichard MacCutchan2-Oct-12 22:58 
AnswerRe: Benefits of using of ADO.NET in .NET 4.0. Pinmembersomasundarapandian4-Oct-12 5:33 
Questioninfragistics webdatagrid editing problem please help me Pinmembersai.20121-Oct-12 14:36 
AnswerRe: infragistics webdatagrid editing problem please help me PinmvpSandeep Mewara2-Oct-12 0:14 
QuestionButton Click event is not working on specific case. Pinmemberayyappakonakalla1-Oct-12 3:54 
AnswerRe: Button Click event is not working on specific case. PinmemberSandip.Nascar1-Oct-12 23:23 
QuestionPDF file was demaged Pinmembervinothini dharmaraj1-Oct-12 2: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 PinmemberEddy Vluggen2-Oct-12 5:51 
Questionconnection string Web.config + ASP.net C# [modified] Pinmemberjojoba20111-Oct-12 1:09 
AnswerRe: connection string Web.config + ASP.net C# Pinmemberrock_monu1-Oct-12 1:16 
QuestionRe: connection string Web.config + ASP.net C# [modified] Pinmemberjojoba20111-Oct-12 1:40 
AnswerRe: connection string Web.config + ASP.net C# PinmvpRichard MacCutchan1-Oct-12 2:13 
QuestionRe: connection string Web.config + ASP.net C# PinmemberMember 94738091-Oct-12 5:23 
AnswerRe: connection string Web.config + ASP.net C# PinmvpRichard MacCutchan1-Oct-12 5:31 
AnswerRe: connection string Web.config + ASP.net C# PinmvpRichard MacCutchan1-Oct-12 5:33 
QuestionRe: connection string Web.config + ASP.net C# PinmemberMember 94738091-Oct-12 8:05 
AnswerRe: connection string Web.config + ASP.net C# PinmvpRichard MacCutchan1-Oct-12 8:37 
QuestionRe: connection string Web.config + ASP.net C# Pinmemberjojoba20111-Oct-12 23:04 
AnswerRe: connection string Web.config + ASP.net C# PinmvpRichard MacCutchan2-Oct-12 3:52 
QuestionRe: connection string Web.config + ASP.net C# Pinmemberjojoba20112-Oct-12 4:04 
AnswerRe: connection string Web.config + ASP.net C# PinmvpRichard MacCutchan2-Oct-12 4:26 
QuestionRe: connection string Web.config + ASP.net C# [modified] Pinmemberjojoba20112-Oct-12 7:05 
AnswerRe: connection string Web.config + ASP.net C# PinmvpRichard MacCutchan2-Oct-12 7:39 
AnswerRe: connection string Web.config + ASP.net C# Pinmemberjkirkerx2-Oct-12 19:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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.150224.1 | Last Updated 27 Feb 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid