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");
            });
    }
Developer technologies | ASP.NET | ASP.NET Core
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.