Skip to content
New issue

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

SVG file in child block didn't get printed #673

Open
sDuyToans opened this issue Jan 12, 2024 · 0 comments
Open

SVG file in child block didn't get printed #673

sDuyToans opened this issue Jan 12, 2024 · 0 comments

Comments

@sDuyToans
Copy link

Hi, i'm facing an issues. I came here from a forge of low-code platform name os. The require is capture the screen and print at pdf file. The html2pdf worked really fine. But the svg inside child block didn't get print, also the footer is in wrong position, because it is fixed so when i print it will appear in the part that the screen capture.
Here is my code:

var element = document.getElementById($parameters.ContainerId);
if ($parameters.ContainerId == 'Body'){
element = document.body
}
var opt = {
margin: $parameters.Margin,
filename: $parameters.FileName,
image: {type: 'jpg', quality: 0.99},
html2canvas: {dpi: 192, letterRendering: true, useCORS: true},
jsPDF: { unit: "mm", format: 'b3', orientation: "l" },
};
html2pdf()
.set(opt)
.from(element)
.toContainer()
.then(function(){
var doc = $('.html2pdf__container');
doc.find('.show-on-export').show(); // show content hide by CSS.
})
.save();
any have solution for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant