The best approach for such tasks is to create a report, where you can add all the required things. Creating report is such a simple and drag drop procedure. You can find my tutorial regarding reports. ruclips.net/video/nY7HdQTwh4w/видео.html&ab_channel=RSDServices
this.Page.RenderControll(hw) line mai ak error ara hai...System.InvalidOperationException: 'RegisterForEventValidation can only be called during Render();'
@@optimistms You simply create a folder in project directory and on save button, you upload that selected file to said folder. You can find many sources online regarding this method.
Thank you bro , this is very useful , I have one question, when I export PDF file , its only show labels information and doesn't show values that I entered in web form in TEXT box , so can you explain that .. thank you again
The best approach for such tasks is to create a report, where you can add all the required things. Creating report is such a simple and drag drop procedure. You can find my tutorial regarding reports. ruclips.net/video/nY7HdQTwh4w/видео.html&ab_channel=RSDServices
Hello, I fix the errors on code and I found it the code solve is this using(StringWriter sw = new StringWriter()) { using(HtmlTextWriter htw = new HtmlTextWriter(sw)) { this.Page.RenderControl(htw); StringReader sr = new StringReader(sw.ToString()); iTextSharp.text.Document pdfDoc = new iTextSharp.text.Document(PageSize.A4, 10f, 10f, 10f, 10f); PdfWriter writer = PdfWriter.GetInstance(pdfDoc, Response.OutputStream); pdfDoc.Open(); XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, sr); pdfDoc.Close(); Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment;filename=file1.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Write(pdfDoc); Response.End(); } } only use 3 using libraries using iTextSharp.text; using iTextSharp.text.pdf; using iTextSharp.tool.xml; Regards
Source Code ::
github.com/rsoftwared/RSD-AspxToPDF
Thank you for this wonderful tutorial. My question is, why am i not getting the correct layout from bootstrap?
Maybe you are missing something, otherwise if you follow the theme or bootstrap properly there is no issue.
i want to show gujarati font so how to added gujarati font
in pdf right now its not supported so please help me
You simply copy paste your unicode language into report. It's working.
Why when I download the page as a pdf it shows only the labels but the images disappear?
The best thing is to make a report of that certain data.
Can we follow same procedure for exporting textboxes, labels etc. in web forms to pdf? please reply
The best approach for such tasks is to create a report, where you can add all the required things. Creating report is such a simple and drag drop procedure. You can find my tutorial regarding reports.
ruclips.net/video/nY7HdQTwh4w/видео.html&ab_channel=RSDServices
Hi bro styles and images are missing while exporting. any option we have to rectify this issue
The best thing is to make a report as your requirements.
The best thing is to make a report as your requirements.
this.Page.RenderControll(hw) line mai ak error ara hai...System.InvalidOperationException: 'RegisterForEventValidation can only be called during Render();'
You're missing a tag that added in the aspx page at the top of page declaration that is "EnableEventValidation="false""
Very nice one. Please can you tell from where you are getting Xmlworkerhelper
You can find everything in this video description 🙂
S, thanks
@@RSDServices One more thing, i want to save the file for later upload to database, can you help?
@@optimistms You simply create a folder in project directory and on save button, you upload that selected file to said folder. You can find many sources online regarding this method.
@@RSDServices Tried, after so many attempts, either the file is getting saved or downloaded, but not both. If u can offer help that will be fine
Thank you bro , this is very useful , I have one question, when I export PDF file , its only show labels information and doesn't show values that I entered in web form in TEXT box , so can you explain that .. thank you again
The best approach for such tasks is to create a report, where you can add all the required things. Creating report is such a simple and drag drop procedure. You can find my tutorial regarding reports.
ruclips.net/video/nY7HdQTwh4w/видео.html&ab_channel=RSDServices
who is the link of the proyect? for dowload
I'll share it soon.
@@RSDServices how many days
@@cristopherariasvera2028 Here is link : github.com/rsoftwared/RSD-AspxToPDF
how to export pdf in another page ?
What's meant by another page?
Thank you Boss ...
You're welcome!
Keep Sharing...
Yes i have a some error occurred in Get instance many time i will try but i can't find solutions
What type of error? Are you missing something?
Great
Thanks
Code Not Working One Error Coming
Error Please?
Please try it again, hopefully you resolve your error by yourself.
Sir help me if any di this its very urgent
Yes please.
No voice
Yes, only practical at this time.
So beautiful sharing
please saty contact
Keep sharing.
Hello, I fix the errors on code and I found it the code solve is this
using(StringWriter sw = new StringWriter())
{
using(HtmlTextWriter htw = new HtmlTextWriter(sw))
{
this.Page.RenderControl(htw);
StringReader sr = new StringReader(sw.ToString());
iTextSharp.text.Document pdfDoc = new iTextSharp.text.Document(PageSize.A4, 10f, 10f, 10f, 10f);
PdfWriter writer = PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, sr);
pdfDoc.Close();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=file1.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Write(pdfDoc);
Response.End();
}
}
only use 3 using libraries
using iTextSharp.text;
using iTextSharp.text.pdf;
using iTextSharp.tool.xml;
Regards
Great 👍
Great
Thanks, Keep Sharing.