How to Convert my Code into Base64 Pdf formate #3069
Unanswered
saijamiuno
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So i need to Convert the below div into Base64 PDF formate i m getting it in base64 ( Image format ) can anyone help me out....
if a div contain some design with id = "printablediv"
const handleConvertToImage = () => {
const printableDiv = document.getElementById("printablediv");
html2canvas(printableDiv).then((canvas) => {
const image = canvas.toDataURL("image/png");
console.log(image, "image");
});
};
Beta Was this translation helpful? Give feedback.
All reactions