codeigniter dompdf ajax not saving the pdf
===

I am facing a problem, i've successful to generate the PDF file using dompdf but its not getting display into browser window and when i try to debug using firebug it shows me the following pdf format data


    %PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R >> /XObject << /I1 9 0 R >> >> /MediaBox [0.000 0.000 612.000 792.000] >> endobj 4 0 obj [/PDF /Text /ImageC ] endobj 5 0 obj << /Creator (DOMPDF) /CreationDate (D:20120710102754+00'00') /ModDate (D:20120710102754+00'00') >> endobj 6 0 obj << /Type /Page /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Length 400 >> stream 0.000 0.000 0.000 rg BT 34.016 719.095 Td /F1 24.0 Tf [(Darksiders II)] TJ ET BT 34.016 683.969 Td /F1 14.0 Tf [(Panda)] TJ ET BT 34.016 653.268 Td /F1 12.0 Tf [(2012-07-04)] TJ ET q 48.000 0 0 48.000 34.016 586.457 cm /I1 Do Q 0.500 0.500 0.500 rg BT 34.016 627.257 Td /F1 8.0 Tf [(Image not readable or empty)] TJ ET BT 34.016 617.257 Td /F1 8.0 Tf [(media/stats/images/a:2:{i:0;s:36:)] TJ ET endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Times-Bold /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /XObject /Subtype /Image /Width 64 /Height 64 /Filter /FlateDecode /DecodeParms << /Predictor 15 /Colors 3 /Columns 64 /BitsPerComponent 8>> /ColorSpace /DeviceRGB /BitsPerComponent 8 /Length 929>> stream h�՚�n�@���T�R�#���.�"Z!�����P���\!W[M�.����]�,��*@ș��������3�����6��n�O�M]�#����|֯/����D4�I��Ǉ�pEQ�$UUM\UU�e�l6�O~C�8��|��DD��>�cD�>5��������k�~�gߴZ� ���bQŤ4QY���g����$��"*�b�X�Z�ડ,���#'I�N�O�� b����nD?Q�睑����Q���j+��z�6Xfp�����{��3w@#��k�!�<�<�TU�~�����r��R�y�{���`/��1˲p9��k�8��~�slp�W?��4ǽ��3VI܂�LY� �ӮY���"��|���@p�>9=,k[��;�� u]ߝsl�M��%p����fE��^`\�%=��["�e^b�-�|CHcS[뺶��,���õ��O�n�K�Tv���󒾝��}a�5/��N �M��x�7 "��y\���� ���������L(Dt:��,��wQ�$��T����C��(���cs� �3����9�vƒ�R���}�6��XL�R�t:%Ib�!v�2������M�@峷���1H�V_(��C�NS�����\sV�ՀS���a����i��~i`��b�c��0D����N<w���w��r)x�������#���c>8�I��k}�Ӷ���}����Y�Ŵ�ug|_��}������>��M�L��b9/�z�k��Ͼ�ͼ�-����c��i����;B�{�#�֌�O�����`�����*�BvΑ����k}���%�9kǪ���yi>������i�N�z���������f�a�O�`�ݎg�/��� endstream endobj xref 0 10 0000000000 65535 f 0000000008 00000 n 0000000073 00000 n 0000000119 00000 n 0000000299 00000 n 0000000336 00000 n 0000000450 00000 n 0000000513 00000 n 0000000964 00000 n 0000001072 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R >> startxref 2241 %%EOF


but it does not save it to pdf file, i am using the following code to generate pdf file.


    $('#get_pdf').live('click', function(e) {
	    e.preventDefault();
		c_id = $('#ca_id').val();
		c_st = $('#ca_start').val();
		c_ed = $('#ca_end').val();				
				
		$.ajax({
	    	url: 'get_pdf',
	    	type: 'POST',
	    	data: {ca_id: c_id, ca_start: c_st, ca_end: c_ed},
	    	success: function(data) {
	        	console.log(data);
	    	}
    	});
	});

it was working fine without ajax...