Skip to content

CSS rules are not getting applied #219

Open
@ermarkar

Description

@ermarkar

Thanks for the library. I was using jspdf that was showing black screen. This lib works fine but, the css rules are not getting applied. This is how I am using this with Angular

Installed

yarn add html2pdf.js

and then in my .ts file

import * as html2pdf from "html2pdf.js";

and

var opt = {
            margin: 1,
            filename: 'Invoice.pdf',
            image: { type: 'jpeg', quality: 0.98 },
            html2canvas: { scale: 2 },
            jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' }
};

html2pdf(__domElement, opt);

And this is the DOM element

original

and this is the output

ss

any solutions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions