Question: I would like to get the HTML page in the PDF.

After some studies I found the pdfJS plugin, it has some problem with bootstrap , the layout will be messy

<http://jsfiddle.net/5ud8jkvf/>

here is the fiddle

I found the default print as PDF result is great 

[![enter image description here](https://i.stack.imgur.com/4rl3r.png)](https://i.stack.imgur.com/4rl3r.png)

```
var doc = new jsPDF();
var specialElementHandlers = {
    '#editor': function (element, renderer) {
        return true;
    }
};

$('#cmd').click(function () {
    doc.fromHTML($('#content').html(), 15, 15, {
        'width': 170,
            'elementHandlers': specialElementHandlers
    });
    doc.save('sample-file.pdf');
});

```

So , instead of fixing the problem for pdfJS, I wonder are there html / jquery way to get the pdf from the print as pdf.

The HTML need to convert to PDF is one page application form only, thanks a lot

Answer: 
The current version allows to get the [blob](https://github.com/MrRio/jsPDF/blob/master/jspdf.js#L970) or the [arraybuffer](https://github.com/MrRio/jsPDF/blob/master/jspdf.js#L968) of the pdf. The only thing you have to do is to update from 0.9 to 1.2.x of the library and call save like this

```
var myBlob;

$('#cmd').click(function () {
    doc.fromHTML($('#content').html(), 15, 15, {
        'width': 170,
            'elementHandlers': specialElementHandlers
    });
    myBlob = doc.save('blob');
});

```
Try [jsPDF-AutoTable (jsPDF plugin)](https://github.com/simonbengtsson/jsPDF-AutoTable), this may help you to convert to PDF from HTML as you want. Check out the [demo](https://simonbengtsson.github.io/jsPDF-AutoTable/)