The Easiest Way to Create PDFs in .NET

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

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

  • @thealbear3629
    @thealbear3629 Год назад +29

    The real time viewer is a gamechanger. that amount of time I spend rebuilding, checking only to find that the pdf is out by a few pixels. Amazing!

  • @shaihulud4515
    @shaihulud4515 Год назад +68

    Nick, I get the impression you're reading my mind. Every month you come up at least with one topic that's currently on my learning list. Thank you so much, and keep up reading our minds :)

    • @steeleybob1988
      @steeleybob1988 Год назад +2

      I am also under this impression, or we are all sharing the same hive mind 😂

    • @AdityaGupta-qd8iv
      @AdityaGupta-qd8iv Год назад +2

      Definitely hive mind 😅

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

      It's because he is working on some projects like we all do in our side-hustle and we all face similar challenges

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

      Me too. I was thinking about this topic today for my future hobby project and all of sudden he has made a video on this which is no where related to videos he made recently. I can't believe it.

  • @steffenp7384
    @steffenp7384 Год назад +21

    Awesome to see you create a video on this. I've been using this for the last few months for a client. There are still some rough spots, but it has been amazing for creating Pdf's. If you're doing mostly simple things, this will be perfect for you. As you get to some of the complex stuff, specially if it requires measurements due to needing to wrap contests or show them in a non supported layout or ordering type, it can be a bit touch and go to get what you want.
    Overall highly recommend this library.

  • @DamianLawrence-w2f
    @DamianLawrence-w2f 7 месяцев назад

    Nick ,junior developer here - you along with Fireship are the 2 reasons I'm working as a developer today, you guys are clear ,fast paced and great teachers! Keep it up man.

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

    I used this library one of my project and it is really good library and working very stable.

  • @dukefleed9525
    @dukefleed9525 Год назад +7

    my current approach is to use puppeteer sharp to convert an html page using chromium. the html page is generated by a blazor page / component, this way i can visit the page to see how it displays, also making it user accessible for preview. The downside of this is that puppeteer is very heavy and it is a little complicated (but possible) to write cross platform code due to the native part of the process. QuestPDF looks very interesting!

    • @Yous0147
      @Yous0147 Год назад +2

      This is the way. It's way simpler and more powerful to generate a pdf using html than any other medium I've found.

  • @jannickbreunis
    @jannickbreunis 3 месяца назад

    This looks amazingly easy and straightforward, as it should be! Amazing. Thanks for the video.

  • @camrws
    @camrws Год назад +2

    really cool seeing u support the packages you show to your audience

    • @tacolotto
      @tacolotto Месяц назад

      Agreed the sheer class is 👏👏👏

  • @JoelThemmen
    @JoelThemmen Год назад +3

    We've been developing with Quest for a while. Really useful, great for a large number of use cases and a gentle learning curve. Highly recommend for small to mid-tier projects (and maybe beyond)

  • @szikig
    @szikig Год назад +20

    The biggest job for me is generating pdfs from templates. The goal is to generate as fast as possible. On the templates there are fields that have to have different values for each pdf file. The fastest I've achieved so far was the Aspose package, generating from MS WORD templates, for the simpler templates I could achieve 1000 pdf/sec.

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

      What my team is currently using is Gotenburg to give html styling together with Scriban to script the different values to generate our pdfs from templates we create ourselves. Has a bit of a learning curve but afterwards it is very easy to use as very fast to generate the pdfs

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

      We are using wkhtmltopdf. As the name implies you can use a html template and replace some variables in there with your wished content. Easy styling, easy layout but I did not check the speed of it.

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

    This is a pretty impressive library, it took me just half a day to recreate a few documents at my work, way less painful than anything else I've used to generate report documents.

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

    This is amazing! That hot reload would've saved me sooo much time years ago when I last had to generate PDFs for a work project, if only it had been around back in the mid 2000s! 😅

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

    How this is possible 😮. I was thinking about this topic today and all of sudden you have made a video on this which is no where related to videos you have made recently. It's a miracle ✨ 💯

  • @chrismantonuk
    @chrismantonuk Год назад +24

    Me: Trying to convince my multi-million dollar a year client to pay $500/year for the commercial license
    Client: Can’t we just build our own from scratch?

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

    This video is a game changer for me. I finnaly will get rid of Crystal Report and his bad backwards compatibility. Thanks!!

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

    wow this is an amazing dev experience for something that has always been way too complicated that is used in so many different use cases. Thanks for sharing! adding this to my tool box!!!!.

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

    I remember when this library first came out. So happy to see it featured in a Nick Chapsas video

  • @derangedftw
    @derangedftw Год назад +5

    I actually used this library about a year ago to generate mini prints of QR codes and additional information in a two column design and then cut automatically after print. One of the most convenient PDF generation tools I've used and have sent support. The only issue I had with it was generating large PDFs in megabytes because a font set gets embedded with it. At the time I used it, the only fix was embedding a stripped down font set so you can generate PDFs that are kilobytes in size. Otherwise, an amazing library!

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

      I'm a new programmer and haven't been able to manage to create a pdf that will cut automatically. Do you perhaps have any tips on how to do this?

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

    The preview option is amazing, a productivity booster; it eliminates lots of tedious work.

  • @SerafimMakris
    @SerafimMakris Год назад +8

    It would be nice in your next video to show how to sign this PDF, as it is something that is becoming a requirement in more and more businesses. Very good video. Keep it up.

  • @AJIexa8
    @AJIexa8 Год назад +9

    Great video! There’re also libraries which build PDF based on HTML page. This could be convenient for backend developers with basic frontend knowledge. With HTML template you can gain same preview experience with well-known CSS styling on board

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

      Few examples please 🙏

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

      @@RenjithRs123 I use puppeteersharp in my project, basically it runs a chrome browserless in the background and use the "print" feature of the browser to create the pdf. I can generate some very complex templates and pdf's.

    • @AbhaySingh-lf4oy
      @AbhaySingh-lf4oy 8 месяцев назад

      @@guilhermeflores7564can i ise it in production? Like on aws on my server do i need to install chrome ? Or every thing is included in nuger package ?

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

    Really awsome Library!
    I am using it for some time now and you can fulfill all most common Use Cases with it

  • @CRBarchager
    @CRBarchager Год назад +2

    I've been using SelectPDF for years now. It's not as simple as this but it can take an entire html page with css included and create a PDF from that. It's enough for what I'm doing right now but I might give this a try at a later time.

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

    This is just amazing. Definitely have to keep this in mind in the future. Thanks for sharing!

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

    1 of the best pdf library i have seen for creating pdf

  • @MrMatx360
    @MrMatx360 Год назад +2

    to Generate Pdf's i've using the razorlight lib with wkhtmltoPdf lib, i get the cshtml razor, and trasform in string html to pass as content on wkthml pdf content prop and works well

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

    Seems I as much excited as Nick about this library :) And the pricing model is also REALLY attractive

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

    Nice - being playing with Quest - good hints and information - wonderful.

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

    Thanks for sharing!!! It would be nice to see a demo with variables instead of writing strings, just an idea!

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

    Great library! Used it in recent project for (not maybe ideal use case, but still it was best option) to generate photobooks with custom layouts. Works like a charm.

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

    This may finally be the thing I needed to rewrite my pdf manipulation tool. 🤩

  • @svetlomirgadzhanov3985
    @svetlomirgadzhanov3985 10 месяцев назад

    Thanks for that very useful package, @Nick Chapsas! Here, I'd like to ask for some .Net solutions but for populating with data of already-defined PDF template files.

  • @attilaguba856
    @attilaguba856 9 месяцев назад

    This is so cool! Thanks you shared this one! Definitely I'll use it! Many thanks!

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

    You gave me hope, and then you killed it when you started talking about a commercial license

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

    LOL i just found QuestPDF 2 weeks ago. Love how easy it makes woking with PDF.

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

    I wasn't expecting this topic but it's amazing 😆

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

    ABCpdf is what the organization I'm affiliated with uses. The API is akin to something from the 1990s. When .NET Core arrived and we inquired when they would support it, their answer was "Why would we do that. You can just use .NET Framework". Eventually they came around on that one, but not until after using having to segment off special services written in legacy frameworks to support functionality.

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

      I came from the same sort of background. I just finished rebuilding our generator from ABCpdf to QuestPdf, and the speed upgrade were so enormous that we didn't even bother to measure it, at the very least 20x faster, might even be 50x.
      The biggest problem was that I had to make it 100% backwards compatible, which caused some issues, as we had support for HTML in the ABCpdf library, which QuestPdf doesn't.

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

    QuestPDF is awesome! Thanks for sharing, Nick!

  • @pad303
    @pad303 Год назад +3

    Is there a way to load another PDF as a template then place text over the top?

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

    I use QuestPDF and like it. I love seeing the previewer in action. I knew about it, but didn't know it was that easy to use. The issues I've run into with QuestPDF are situations when content overflows in some way. In a large data-driven pdf, I've found it hard to track down exactly where the failure is. I ended up creating an integration test that does several iterations of my pdf, and I have logic for retrying with smaller data sets to isolate issues. I would rather not have to go to lengths like that, but it's still a good library.

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

    I haven't worked with it, but I definitely like it)
    Thank you so much.

  • @ALICEFELIX1
    @ALICEFELIX1 9 месяцев назад

    Awesome exactly what i was looking for thank you much Nick Chapas. I have tried so many options but i couldn't get anything close to it with community license

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

    Does anyone have an idea how to add a latex generated formula to a PDF?
    Do I first have to convert it to an image and then as a stream to PDF?

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

    That looks amazing, thanks for showing!

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

    Thanks for creating this video, we want more video on PDF read, manipulate and re-generate, upload, download and merge pages and split, rotate PDFs. Please.

  • @Pouya..
    @Pouya.. Год назад

    We are using stimulsoft for so ling now and the experience was perfect

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

    Thank you so much for sharing this amazing library.

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

    Great video Nick
    Is it possible that Milan Javanovic always publish some video similar to Nick couple days/weeks later 😂

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

    Great library. I use IText. But I think I am going to play with quest. Seems much easier. Plus the previewer is spectacular.

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

    Looks like a very healthy alternative to telerik reporting which we use at work these days. Although we would lose support for exporting the reports we create to microsoft office formats.

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

    The library is great indeed, but I met one drawback of this lib. It's size of generated file. I need special characters in my document and to do that, I had to use Fallback of another font. Additional fonts may contain thousands of glyphs and all of them are used in generating document, when i need onlyy two of them. Therefore my generated document with 4 pages has size about 6 Mb, this is too much. I tried to use another font without fallbacks, and that helped for sure, but still too large file at the end (about 600 Kb). May be I miss something, but I can't deal with this problem yet. I will try IText lib.

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

    Very nice, but are the PDF WCAG complient?

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

    I have clients that already have their invoices in Word (docx) and wants to generate PDF, does this library allows me to export to PDF or at least import the current content from Word?

  • @MerliniusAmbrosius
    @MerliniusAmbrosius 4 месяца назад

    not familiar with code, but i'm interested in this.
    Is there a way where it can select from random images in specified folders, size them to your specific requirements, spacing, etc. then repeat that a specific number of times to create a single pdf file with dozens of pages?
    for example, i'm trying to generate booster packs for a tcg, so I need specific number of different card rarities selected and then repeated like 24 times for 24 packs in a single pdf so that paper doesn't get wasted, it just fills in the spaces of a 3x3 grid on each page

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

    Very cool, I've been wondering about this for a while

  • @the-avid-engineer
    @the-avid-engineer Год назад

    This looks like a great tool for doing what it’s made to do! The visualizer is cool
    The only nock I have on this is that it doesn’t have a way to handle variable-length content. You seemingly *have* to know how much fits on a page ahead of time, but in some cases that’s impossible

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

      By looking at the invoice example that has been done here: ruclips.net/video/-iYvZvpLX0g/видео.html it looks like the content will auto-wrap to another line if it won't fit. Not sure what's going to happen if you make width 1px for something like product description ;)

    • @the-avid-engineer
      @the-avid-engineer Год назад

      @@elpe21 I should have been more specific. It’s good that lines will auto-wrap to the next line; what I mean is if there is no more space for lines on the page but there is more content, I would presume since you have to explicitly create pages that it won’t wrap to a new page.
      If you took the lorem ipsum from this video and used it.. say.. 20 times instead of once. It won’t fit on the page unless you make the font so small you can’t read it

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

      @@the-avid-engineer by looking at the example from the video i've posted it will take the lorem to next page(s) . Check the viedo I gave, time 34:06

    • @the-avid-engineer
      @the-avid-engineer Год назад +1

      @@elpe21 well thats just freaking awesome

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

    Would like to see how it deals with page overflow and whether you can break up paragraphs or keep paragraphs together

  • @ParsaMokhtariHessar
    @ParsaMokhtariHessar 2 месяца назад

    I wonder if there is a way to make a pdf file(from msword or latex or publisher for example) and edit only the dynamic parts on the fly!

  • @pinkyy2729
    @pinkyy2729 9 месяцев назад

    i am just curious what is this workflow ? and how do i start c# .NET project like that and can i build a UI for it.
    i am used to working with visual studio and Windows Form Application projects, but this seems a lot cleaner and straight forward

  • @vadak_
    @vadak_ 9 месяцев назад

    Thanks! Exactly what I needed

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

    how can I create an endpoint for to make a download the pdf? I can create the layout, but I can't to create an endpoint in my web API

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

    Looks like previewer doesn't work with latest version? I have a .NET 8 app and installed 2023.12.4, then tried Previewer 2023.12.2, not compatible with .NET 8 error

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

    Super cool - I will check it out for my next project 😍😍

  • @AbuBakrSadiqi-b7t
    @AbuBakrSadiqi-b7t 5 месяцев назад

    Is this works while we publish our apps to Linux server? Most of the time image generation libraries doesn't work cause they uses windows apis for that.

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

    How would library fair while trying to generate a pdf from an AWS Lambda and store it onto a s3 bucket?

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

    Looks interesting but how does something like this compare to using the report viewer control and RDLC documents?

  • @arturaskravcenko
    @arturaskravcenko Год назад +4

    I create a view, then fill it with it's model, then get it's html and pass it to puppeteer to return a pdf.

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

      Do you mind sharing some code? I like that approach, but my PDF ended up being much larger compared to the same file generated using wkhtmltopdf.

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

    Looks great. I would have been happy to see how to generate grids. Because for my use cases, it is one of the most difficult things to achieve.

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

    The best feature is, that it is c# where you can use loops, classes write extensions and allfthat. Passing your models and everything as you know it. Its genious.

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

    I am using a puppeteersharp to render HTML to image but it is slow because it needs to create a new instance of the browser take a screenshot and close it. Do you guys know how can I improve the speed? I am talking about tens and maybe hundreds of requests per second.

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

    nick would love to see some vids with open apis and gpt..or maybe you can suggest how devs can make some good product with them.

  • @ItsMe-nt5zc
    @ItsMe-nt5zc Год назад

    can someone help me? when i wanna try. i got this error, how to solve this one?
    Severity Code Description Project File Line Suppression State Error CS8370 Feature 'top-level statements' is not available in C# 7.3. Please use language version 9.0 or greater.
    thanks

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

    I use syncfusion, you can also convert word files to pdf, a few of my customers want to do their own layout, you can then merge data from the word template to a pdf. Doesn't mean it is the best library though but hey i am happy with it.

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

    We use an xsl-fo library for this, but it's really expensive. Not sure if we would get the same functionality here. Wondering if Quest has block containers, blocks and spans. If so then it might be worth a switch, if the speed was on par with the xslt transformation.

  • @arjunmenon2901
    @arjunmenon2901 Год назад +2

    What's your take on IronPdf ? Is this supported in Linux containers ?

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

    Exist a Report Builder/Manager opensource that works with mysql and c#?

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

    I'll check it out, looks promising. My challenge is with headings/references/hyperlinks and a TOC, I hope they have good support for that

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

    thank you so much that was so helpful!

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

    Based Nick sponsoring open source projects

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

    Need an html pdf generater could you suggest best lib for it?

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

    I love that library, and I am lobbying for my employer to start paying for it so I can get latest and greatest features

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

    Having a visual "report editor" makes me a lot more productive.
    I don't need to waste time working out HOW I put stuff down, I just create it.
    I guess that I prefer my productivity over knowing the guts of a system, especially when I need to do so many different jobs.
    NOTE: I am NOT saying that there is anything wrong with this approach.
    This probably works well for the vast majority of people, and I CAN see where it would.
    It is just not something that makes me more productive, and at the end of the day, my time is more valuable.

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

    PDFFlow works very similar to that and has almost the same syntax. Testing it out is slightly more cumberstone tho

  • @teamdroid9834
    @teamdroid9834 2 месяца назад

    the eay i struggled with jspdf html2pdf the documentation is rubished but questpdf if so coool that you enerate it from back end who knows with blazor it might as well be possible to generate it thanks for this @Nick

  • @asrajan55
    @asrajan55 9 месяцев назад +1

    Easiest way to build a PDF is to write a HTML page and use iText to convert it..however some special operations may be lacking. But for 90% of the use cases I think this is the most friction-free approach.

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

    What would be a great library for parsing PDF with a similar licensing model? I've used PdfPig in a commercial project, but it was a bit of a pain to make it work, when the PDFs are structured in a slightly different way.

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

    What about reports in your application. Do you use a PDF library most of the time, use Crystal Reports, or code it yourself?

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

    When I try to run the previewer, AVG blocks a virus threat as IDP.Generic.

  • @I-PixALbI4-I
    @I-PixALbI4-I Год назад

    Hello Nick!
    Idea for next video - Benchamrks: Json vs ProtoBuff vs Cap'n Proto vs MessagePack vs ...

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

    can i also merge / split pdf documents with that library?

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

    Wow I've wanted this video for years including a project I just started. Why is this so hard?

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

    building a github watching bot for my team and it might be nice to output these summaries to pdf thank you Nick! :) Oh seems like a factory pattern might be nice with this one.

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

    We use Devexpress Reports, and build reports, then whenever a user needs a PDF, Excel, word document of whatever is on the screen they have to manually click options to generate files, in my use case reports are the way to go, but when code close source, and only shared with development team, then i think report are the wasy to go, but the moment code is shared in whole team(developers, EDPs, reports & tests and all) then I think you need code based PDF just like quest PDF

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

    Writing markup in code looks fun. I usually write my markup in markup.

  • @freigeist2147
    @freigeist2147 8 месяцев назад

    can I add a border Radius to Container some how ?

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

    Did a lot using PDFSharp to make election maps a while back. This would have been so much better than the way I had to do it back then! Obviously was not available back then.

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

    I've heard many similar libraries have a problem with memory leaks. has anyone had such a problem on this library

  • @source-454
    @source-454 2 месяца назад

    amazing video thanks

  •  Год назад

    Using MigraDoc, and not much code needed to create a previewer there also. Tried some of the HTML to PDF libraries, and they often are full of issues. Either performance (with resource leaks etc.), or just broken formatting (tables rendered outside of the "paper" etc.).

  • @davestorm6718
    @davestorm6718 5 месяцев назад

    Quest is good, but you cannot use it for mobile apps (MAUI). I know, I know, "call a web api from your app" mantra is always recommended, but wouldn't it be great if you could create a PDF from a mobile device with .Net (easily) ?