I\'m using the mpdf library to generate a PDF of user-generated html. I can get the PDF to save to the server successfully, but I want the PDF to open in the browser for the
I ended up not using AJAX and instead added a hidden input on the form and populated it using the following script:
$('#save').click(function() {
event.preventDefault();
var shelf_clone = $('#shelf').clone();
var shelf = shelf_clone.prop('outerHTML');
$('#save_shelf input[name=shelf]').val(shelf);
$('#save_shelf').submit();
});