How to Easily Create a PDF Document in ASP.NET Core Web API

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

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

  • @CodeMaze
    @CodeMaze  6 месяцев назад

    Thank you all for watching and for your support.
    ►► If you want to master Web API development using best practices, check out our Web API book: bit.ly/3x75ZMM
    ►► Also, to build great full-stack apps with Blazor, check out our course: bit.ly/3Pw3Y33

  • @deepakdhande6063
    @deepakdhande6063 11 месяцев назад

    I am big fan of code maze. Code maze articles & videos has solved my critical real project problems. Thanks a lot to the Code Maze!!!

    • @CodeMaze
      @CodeMaze  11 месяцев назад

      Great to hear! Thanks for the support

  • @shaikfaizuddin9164
    @shaikfaizuddin9164 4 года назад +2

    I am always fan of codemaze. The way the explanation goes is to the point.

    • @CodeMaze
      @CodeMaze  4 года назад

      Thanks a lot Shaik for the support.

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

    Sir i love you in somany ways rn

  • @NickFletcher-gb9ne
    @NickFletcher-gb9ne 11 месяцев назад

    Amazing, thank you very much.

    • @CodeMaze
      @CodeMaze  11 месяцев назад

      Our pleasure! Glad you like it.

  • @auliatinisa5012
    @auliatinisa5012 4 года назад +1

    Awesome video, thank you

    • @CodeMaze
      @CodeMaze  4 года назад

      Thank you for watching it. Have a great day.

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

    very nice explain ! how to bind data from sql server database to pdf? using dotnet core web api only and not using mvc

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

    It doesn't render my image and show block while using it

  •  3 года назад

    Cool video man congrats

    • @CodeMaze
      @CodeMaze  3 года назад

      Thanks! I'm glad you enjoyed it.

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

    I used this tutorial to generate a pdf in my ASP.NET Core MVC project and it worked fine, But I was wondering if it's applicable on deployment, too.

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

      You can read our article about this topic. We've shown how to publish it, and many readers have used it in a publish environemnt.

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

      Sir how did You do it?

  • @hamadaalashry4689
    @hamadaalashry4689 4 года назад +1

    amazing tutorial

    • @CodeMaze
      @CodeMaze  4 года назад

      Glad you liked it. Best regards.

  • @DevotionalDigest
    @DevotionalDigest 4 года назад

    Love it. Thank you.

    • @CodeMaze
      @CodeMaze  4 года назад

      You are so welcome!

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

    How I show

  • @fataleroro2011
    @fataleroro2011 4 года назад

    nice channel continue .
    we need make report like using in crystal report of rdlc report
    but crystal report and rdlc report not supported in asp.net core
    we need alternative way and its better if you using asp.net core project with angular for making this report
    beacuse there is no strong video explain this in you tube
    thanks for nice channel

    • @CodeMaze
      @CodeMaze  4 года назад +1

      Hello Gehad. To be honest I know nothing about these report types, so I am sorry but I can't help you with that.

  • @mahydulislam
    @mahydulislam 6 месяцев назад

    For .net core 8 what will be the service registration?
    builder.services. ???

    • @CodeMaze
      @CodeMaze  6 месяцев назад

      Yes. In the Program class you have the builder variable exposed and you can use it to access the service collection property.

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

    Dear Can I put a static header image for all pages?

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

    how to add logo/image in header?

  • @ed-jamal
    @ed-jamal 3 года назад

    Thank you so much

    • @CodeMaze
      @CodeMaze  3 года назад

      You're most welcome

  • @nayteemo9287
    @nayteemo9287 4 года назад +1

    can you made a video about MVC or razor page using your product???

    • @CodeMaze
      @CodeMaze  4 года назад

      Hello Yan. If you refer to DinkToPdf - it is not our product it is an open source. But we shall see, as soon as we find some free time, to create MVC content.

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

    Excelente

  • @coskungulcicek
    @coskungulcicek 3 года назад

    thank you bro

    • @CodeMaze
      @CodeMaze  3 года назад

      You are very welcome.

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

    Hi, please can you tell me, if this need a special configuration for run in docker? i understand that docker run in linux but dont know if this library would serve me, thanks for your time

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

      Hi Michael. I really don't know. Never used it with docker.

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

    Hello, i'm getting this error: "DllNotFoundException: Unable to load DLL 'libwkhtmltox' or one of its dependencies: The specified module could not be found. (0x8007007E)" Can you help me

  • @tohfatulislammilton9707
    @tohfatulislammilton9707 4 года назад

    Thank you so much for such a nice tutorial. I successfully converted static html pages to pdf after learning from you. But I failed when I tried to convert dynamically created html page generated by angularJS programming.

    • @CodeMaze
      @CodeMaze  4 года назад +1

      Hello. I believe it depends in which format this dynamic page was returned from Angular application. And the way it is formatted. Basically, as you could see, any HTML string, should be converted into PDF doc without any problem.

  • @kewlbakshi
    @kewlbakshi 4 года назад +1

    Hello, I am getting this error upon deployment to production :
    HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
    I have added the LoadUnmanagedLibrary in the startup.cs but still doesn't work

    • @CodeMaze
      @CodeMaze  4 года назад

      Hello Ishan. Well for some reason it isn't able to find the native library as much as I could see. But I am not sure why. Maybe you can look at our article and try to search through the comment section. People have tried deployment on different servers.

    • @sanjaythakur3542
      @sanjaythakur3542 3 года назад

      Hello Ishan,
      Are you able to solve this ?

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

    Where we can find native library and DLL files after installing package?
    Getting null reference exception in _converter.convert(pdf); line

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

      Please visit our linked article on this topic. There you will find a link to source code where you can find those files.

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

      I cannot find DLL files

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

      At the top of the aritcle, you will find a link to our source code, that leads here: github.com/CodeMazeBlog/create-pdf-with-netcore. There, you can find the nativa library folder. Inside you will find those files.

  • @jesushurtado7585
    @jesushurtado7585 3 года назад

    great!

  • @HobTechTV
    @HobTechTV 4 года назад

    hi i got an error :
    AggregateException: One or more errors occurred. (An attempt was made to load a program with an incorrect format. (0x8007000B))
    DinkToPdf.SynchronizedConverter.Invoke(Func delegate)
    BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)
    DinkToPdf.WkHtmlToXBindings.wkhtmltopdf_init(int useGraphics)

    • @CodeMaze
      @CodeMaze  4 года назад

      Please download our source code and compare it with yours. I am really not sure what is the reason for your error. I saw on GitHub forum that they suggest using the 32bit files, but I am not sure why is that, maybe this can help.

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

      Hi I got the same problem as this have you solved this issue?

  • @snehadas2062
    @snehadas2062 3 года назад

    I am trying to deploy on linux server on Azure, But after deployment its showing Application Error. can anyone help?

    • @CodeMaze
      @CodeMaze  3 года назад

      I saw you left the comment on our article. Maybe providing there the description of the error may help someone to help you. I didn't deploy this on Azure, so I can't be of any help regarding that matter.

  • @henrydiaz5554
    @henrydiaz5554 4 года назад

    can you insert images inside the html?

    • @CodeMaze
      @CodeMaze  4 года назад +1

      Hi Henry. Yes you can. Please visit the comment sections of our article on this topic, we have explained to one of our readers how to do that. You have the link to the article in the description or I can leave it here: code-maze.com/create-pdf-dotnetcore/ :)

  • @vishnuraj2413
    @vishnuraj2413 4 года назад

    Very Nice video.......everything working good but not able to convert into pdf with logo or image,, can you please explain how we can do that too. thank you again.

    • @CodeMaze
      @CodeMaze  4 года назад +1

      Hello VIshnu Raj. Please visit our article on the same topic and search in the comments, you will find explanation for this for sure, since we had that kind of question.
      Basically, you can just add the image address to the html markup:
      var picAddress = Path.Combine(Directory.GetCurrentDirectory(), "Images", "CodeMaze.png");
      sb.AppendFormat(@"", picAddress);

    • @vishnuraj2413
      @vishnuraj2413 4 года назад

      @@CodeMaze thanks you very for your reply.but i have already solved that issue with the help of your article....thanks again...

    • @vishnuraj2413
      @vishnuraj2413 4 года назад

      @@CodeMaze one more question.is it safe to use dinktopdf in real projects....i mean it is totally free of cost....and when we use it ,we need to load assemblies manually....this is not the right i think...what you think about that....please reply

    • @CodeMaze
      @CodeMaze  4 года назад

      I don't see the problem in that as long as it is working. You are using Assembly to load the required dll file since dinktopdf is just a wrapper.

  • @hermangaete2156
    @hermangaete2156 3 года назад

    Please, can you help me? "Qt: Could not initialize OLE (error 80070005)" when i call the api

    • @CodeMaze
      @CodeMaze  3 года назад

      I am not really sure why this happens. I just look at the comments on our article, and one reader had the same issue, but he never reported back whether he solved it or not.

    • @hermangaete2156
      @hermangaete2156 3 года назад

      @@CodeMaze I have already solved, but i need run the application in internet information service, is possible? :(

    • @hermangaete2156
      @hermangaete2156 3 года назад

      @@CodeMaze I have copied the dll files in publish folder, but when I run the application by the IIS manager, not works and no mistake :(

  • @ankurbhavsar417
    @ankurbhavsar417 3 года назад

    Is this works on Linux server

    • @CodeMaze
      @CodeMaze  3 года назад

      I didn't deploy it on Linux, but if you visit our article, you will find a lot of comments that people did it. So, I believe it should work.

  • @aishanina469
    @aishanina469 4 года назад

    how its retuen a dwnload link

    • @CodeMaze
      @CodeMaze  4 года назад

      Well, if you create a functionality for your action to download the pdf once it is created, than the link to the action is the download link. Your action is creating the PDF and then you can create different results, as you could've seen in the video. It all depends on what you want to do.

  • @y1y1111
    @y1y1111 4 года назад +1

    (y)

  • @pourianayeb1063
    @pourianayeb1063 4 года назад +1

    Thanks, very helpful.

    • @CodeMaze
      @CodeMaze  4 года назад

      Thanks, Pouria, much appreciated!

  • @camiloramos8810
    @camiloramos8810 3 года назад

    Excelente

    • @CodeMaze
      @CodeMaze  3 года назад

      Thanks a lot Camilo.

  • @marshallkoo5294
    @marshallkoo5294 4 года назад

    Hello my friend I am facing this problem i downloaded the file from google but it is not working unable to load dll 'libwkhtmltox'

    • @CodeMaze
      @CodeMaze  4 года назад

      Don't use the IIS profile to start the app. I think this will solve it.