Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
HTLM with Bootsrap, Images & css to PDF in .NET Core 3.1

I was using below mentioned JavaScript function for export HTML to PDF, even though. css and splitting the page as of break also not working. can anybody help me to solve this issue.

 function generatePDF() {
    var doc = new jsPDF();  //create jsPDF object
    doc.fromHTML(document.getElementById("divMainScreen"), // page element which you want to print as PDF
        15,
        15,
        {
            'width': 170  //set width
        },
        function (a) {
            doc.save("VehicleInspection.pdf"); // save file name as VehicleInspection.pdf
        });
}

HTML:

<div id="divHeader">
            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="red" class="bi bi-caret-right-fill" viewBox="0 0 16 16">
                <path d="m12.14 8.753-5.482 4.796c-.646.566-1.658.106-1.658-.753V3.204a1 1 0 0 1 1.659-.753l5.48 4.796a1 1 0 0 1 0 1.506z" />
            </svg>
            <i class="bi bi-caret-right-fill"></i><font>DATE : 08/09/2021</font>
        </div>
        <div style="break-inside:avoid;page-break-inside:avoid;"></div>//--USING FOR BREAK PAGE
        <div id="divThree">
          //--Body Content
        </div>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!