Capture image for jsPDF in mobile mode to be like full screen mode

Amani 1 Reputation point
2021-06-28T08:49:45.623+00:00

I'm using jsPdf to download a pdf containing a screenshot for a section in the opened window. For full screen mode it works fine. The project can be accessed by mobiles and the view will change, so I'd like to capture the screen as in the full screen mode.

is it possible ?

The current function:

function Pdf() {
        domtoimage.toPng(document.getElementById('pdfImg'))
            .then(function (blob) {
                var pdf = new jsPDF('l', 'pt', [$('#pdfImg').width(), $('#pdfImg').height()]);
                pdf.addImage(blob, 'JPEG', 0, 0, $('#pdfImg').width(), $('#pdfImg').height());
                pdf.save("Progress.pdf");
            });
    }
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
0 comments No comments
{count} votes