简体   繁体   中英

could not print the file to pdf in firefox using this javascript function

function setPrint(tableId) {  
        var page = '<html><table border="1" style="border-spacing:0">' +   $j('#' + tableId).html() + '</table></html>';  
        w = window.open();  
        w.document.write(page);  
        w.print();  
    w.close();  

}

I figured out this problem. Here when it comes to internet Explorer JavaScript is not working properly. In Firefox there is no printing option as PDF but as a solution we can use XPS format. XPS is also like a PDF format but not the best option may be though. if it is for personal usage we can use some thing like cute PDF writer. but this cannot be used as a professional solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM