Convert ASPX Page to PDF in ASP.NET C#

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии • 49

  • @RSDServices
    @RSDServices  2 года назад

    Source Code ::
    github.com/rsoftwared/RSD-AspxToPDF

  • @mandirigmatv012
    @mandirigmatv012 Год назад +1

    Thank you for this wonderful tutorial. My question is, why am i not getting the correct layout from bootstrap?

    • @RSDServices
      @RSDServices  Год назад

      Maybe you are missing something, otherwise if you follow the theme or bootstrap properly there is no issue.

  • @vasimshaikh3532
    @vasimshaikh3532 2 года назад +1

    i want to show gujarati font so how to added gujarati font
    in pdf right now its not supported so please help me

    • @RSDServices
      @RSDServices  2 года назад

      You simply copy paste your unicode language into report. It's working.

  • @Sarah_hadi1
    @Sarah_hadi1 Год назад +1

    Why when I download the page as a pdf it shows only the labels but the images disappear?

    • @RSDServices
      @RSDServices  Год назад

      The best thing is to make a report of that certain data.

  • @ashutoshrane3121
    @ashutoshrane3121 3 года назад +2

    Can we follow same procedure for exporting textboxes, labels etc. in web forms to pdf? please reply

    • @RSDServices
      @RSDServices  3 года назад +1

      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

  • @nagarajuguduguntla3196
    @nagarajuguduguntla3196 Год назад +1

    Hi bro styles and images are missing while exporting. any option we have to rectify this issue

    • @RSDServices
      @RSDServices  Год назад

      The best thing is to make a report as your requirements.

    • @RSDServices
      @RSDServices  Год назад

      The best thing is to make a report as your requirements.

  • @darkeagle5458
    @darkeagle5458 2 года назад +1

    this.Page.RenderControll(hw) line mai ak error ara hai...System.InvalidOperationException: 'RegisterForEventValidation can only be called during Render();'

    • @RSDServices
      @RSDServices  2 года назад

      You're missing a tag that added in the aspx page at the top of page declaration that is "EnableEventValidation="false""

  • @optimistms
    @optimistms 2 года назад +1

    Very nice one. Please can you tell from where you are getting Xmlworkerhelper

    • @RSDServices
      @RSDServices  2 года назад +1

      You can find everything in this video description 🙂

    • @optimistms
      @optimistms 2 года назад +1

      S, thanks

    • @optimistms
      @optimistms 2 года назад +1

      @@RSDServices One more thing, i want to save the file for later upload to database, can you help?

    • @RSDServices
      @RSDServices  2 года назад +1

      @@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.

    • @optimistms
      @optimistms 2 года назад +1

      @@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

  • @almutasimballaalabdulqader5502
    @almutasimballaalabdulqader5502 2 года назад +1

    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

    • @RSDServices
      @RSDServices  2 года назад

      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

  • @cristopherariasvera2028
    @cristopherariasvera2028 2 года назад +1

    who is the link of the proyect? for dowload

  • @asfamiansharie3168
    @asfamiansharie3168 2 года назад +1

    how to export pdf in another page ?

    • @RSDServices
      @RSDServices  2 года назад

      What's meant by another page?

  • @prathameshhiremath1379
    @prathameshhiremath1379 2 года назад +1

    Thank you Boss ...

  • @rohitupadhyay8883
    @rohitupadhyay8883 Год назад

    Yes i have a some error occurred in Get instance many time i will try but i can't find solutions

    • @RSDServices
      @RSDServices  Год назад

      What type of error? Are you missing something?

  • @ummix_explore
    @ummix_explore 2 года назад +1

    Great

  • @SupportMe91
    @SupportMe91 2 года назад +1

    Code Not Working One Error Coming

    • @RSDServices
      @RSDServices  2 года назад

      Error Please?
      Please try it again, hopefully you resolve your error by yourself.

  • @rohitupadhyay8883
    @rohitupadhyay8883 Год назад

    Sir help me if any di this its very urgent

  • @ernestjames4676
    @ernestjames4676 2 года назад +1

    No voice

    • @RSDServices
      @RSDServices  2 года назад

      Yes, only practical at this time.

  • @ZIA_FS_KHAN
    @ZIA_FS_KHAN 2 года назад +1

    So beautiful sharing
    please saty contact

  • @eldesarrollador4537
    @eldesarrollador4537 4 месяца назад +1

    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

  • @muhammadhammad468
    @muhammadhammad468 2 года назад +1

    Great