We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using DinkToPdf library in a .NET 7 web application to create a pdf. However, when I include a pdf in the footer, it does not work.
This is the code for generating the pdf.
var html = await _templateEngine.RenderAsync("Views/CalibrationCertificate.cshtml", calibrationCertificate); var basePath = AppContext.BaseDirectory; var footerViewPath = Path.Combine(basePath, "Resources", "Footer.html"); var doc = new HtmlToPdfDocument() { GlobalSettings = { PaperSize = PaperKind.A4, Orientation = Orientation.Portrait }, Objects = { new ObjectSettings() { HtmlContent = html, FooterSettings = new() { HtmUrl = footerViewPath, } } } }; var result = _htmlToPdfConverter.Convert(doc);
This is the contents of Footer.html.
<div class="hr mt-2 mb-5 page-break-avoid" /> <div class="row mt-2 page-break-avoid"> <div class="col-4"> </div> <div class="col-4 d-flex justify-content-center"> </div> <div class="col-4"> <img src='logo.jpg' /> </div> </div>
This is my folder structure.
Generated pdf is empty when downloaded through the client app.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using DinkToPdf library in a .NET 7 web application to create a pdf. However, when I include a pdf in the footer, it does not work.
This is the code for generating the pdf.
This is the contents of Footer.html.
This is my folder structure.
Generated pdf is empty when downloaded through the client app.
The text was updated successfully, but these errors were encountered: