Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
$("#convert").click(function printPartOfPage(jqxChart) {
var printContent = document.getElementById('jqxChart');
var gridcontent = document.getElementById('jqxgrid');
var windowUrl = 'about:blank';
var windowName = 'Print';
var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
});

unable to convert to pdf it is saving as xps file.Please anyone could help me.
Can anyone help me to convert to pdf
Posted
Updated 5-Jan-14 22:43pm
v2

1 solution

JavaScript's print method used to print the content of the window on which used to the selected (default) printer!
So if you have office installed you also have a xps printer installed, that in lack of other printers will be the default.
Try to install some pdf printer (CutePDF Writer[^]) and select it when printing...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900