相关文章推荐

The second letter in the Hebrew alphabet is the ב bet/beit. Its meaning is "house". In the ancient pictographic Hebrew it was a symbol resembling a tent on a landscape.

Note: Pre-release packages are distributed via feedz.io .

Summary

The purpose of this project is to provide a wrapper around wkhtmltopdf html to pdf generator.

  • Bet.Extensions.Wkhtmltopdf the library to be used in DotNetCore projects.
  • Bet.Extensions.Wkhtmltopdf.WebApi the AspNetCore sample project that runs in Docker Container.
  • Bet.Extensions.Wkhtmltopdf.WorkJob the DotNetCore Console App sample.
  • Hire me

    Please send email if you consider to hire me .

    Give a Star! ⭐

    If you like or are using this project to learn or start your solution, please give it a star. Thanks!

    Install

        dotnet add package Bet.Extensions.Wkhtmltopdf

    Usage

  • In Startup.cs or Program.cs please register the service.
  •     services.AddPdfGenerator();
  • Then use within components
  •     var byteArray = await _pdfGenerator.GetAsync(html, stoppingToken);
        var fileName = Path.Combine(AppContext.BaseDirectory, $"{Guid.NewGuid().ToString()}.pdf");
        using var fs = new FileStream(fileName, FileMode.Create, FileAccess.Write);
        fs.Write(byteArray, 0, byteArray.Length);

    WSL Linux

        sudo apt-get install libjpeg62

    Benchmark

    For details on the benchmarking this project please refer to Benchmarks .

    References

  • DotNet Special Folder Api Linux
  •  
    推荐文章