I am using this ionic package to generate pdf file
https://github.com/cesarvr/pdf-generator
Pdf is generating but it seems like html tags and css is not applied on pdf it seem broken
I am generating pdf like that. I am getting outer html of vue component and then generating pdf from that but thats not happening correctly
let options = {
documentSize: "A4",
type: "share",
fileName: "myFile.pdf",
};
console.log(this.$refs.order.$el.outerHTML)
PDFGenerator.fromData(`<html lang="en"><head></head><body><div id="app">${this.$refs.order.$el.outerHTML }</div></body></html>`, options)
.then(() => "ok")
.catch((err) => console.log(err));
5 posts - 2 participants