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

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 85

  • @CodeMaze
    @CodeMaze  7 місяців тому

    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 Рік тому

    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  Рік тому

      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.

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

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

  • @dabiun7443
    @dabiun7443 Рік тому

    Sir i love you in somany ways rn

  • @marshallkoo5294
    @marshallkoo5294 2 роки тому

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

  • @mahydulislam
    @mahydulislam 8 місяців тому

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

    • @CodeMaze
      @CodeMaze  8 місяців тому

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

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

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

  • @auliatinisa5012
    @auliatinisa5012 4 роки тому +1

    Awesome video, thank you

    • @CodeMaze
      @CodeMaze  4 роки тому

      Thank you for watching it. Have a great day.

  •  3 роки тому

    Cool video man congrats

    • @CodeMaze
      @CodeMaze  3 роки тому

      Thanks! I'm glad you enjoyed it.

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

  • @pourianayeb1063
    @pourianayeb1063 4 роки тому +1

    Thanks, very helpful.

    • @CodeMaze
      @CodeMaze  4 роки тому

      Thanks, Pouria, much appreciated!

  • @BinaryBeta
    @BinaryBeta Рік тому

    how to add logo/image in header?

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

  • @pradm777
    @pradm777 Рік тому

    How I show

  • @hamadaalashry4689
    @hamadaalashry4689 4 роки тому +1

    amazing tutorial

    • @CodeMaze
      @CodeMaze  4 роки тому

      Glad you liked it. Best regards.

  • @ed-jamal
    @ed-jamal 3 роки тому

    Thank you so much

    • @CodeMaze
      @CodeMaze  3 роки тому

      You're most welcome

  • @DevotionalDigest
    @DevotionalDigest 4 роки тому

    Love it. Thank you.

    • @CodeMaze
      @CodeMaze  4 роки тому

      You are so welcome!

  • @coskungulcicek
    @coskungulcicek 3 роки тому

    thank you bro

    • @CodeMaze
      @CodeMaze  3 роки тому

      You are very welcome.

  • @NakibAkash
    @NakibAkash Рік тому

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

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

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

  • @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/ :)

  • @camiloramos8810
    @camiloramos8810 3 роки тому

    Excelente

    • @CodeMaze
      @CodeMaze  3 роки тому

      Thanks a lot Camilo.

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

  • @jesushurtado7585
    @jesushurtado7585 4 роки тому

    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?

  • @ducnguyendinhtrung4745
    @ducnguyendinhtrung4745 2 роки тому

    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

    • @Sagarj143
      @Sagarj143 2 роки тому

      same problem I got

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

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

  • @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 :(

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

  • @y1y1111
    @y1y1111 4 роки тому +1

    (y)

  • @NickFletcher-gb9ne
    @NickFletcher-gb9ne Рік тому

    Amazing, thank you very much.

    • @CodeMaze
      @CodeMaze  Рік тому

      Our pleasure! Glad you like it.

  • @meden8124
    @meden8124 2 роки тому +1

    Excelente