I used html2PDF module to convert and HTML code written in PHP to convert in to PDF..
The same script is properly working in Mozilla Firefox Browser in version 50.. (Latest)
But when I tried the same page using Google Chrome browser in version 54. (Latest) it is generating following outout instead of PDF...
As per this, there should not be any issue with the code.. Because it's working with firefox..
What can be the issue for this?
This is the wrong output I got when tried with Google Chrome;
%PDF-1.7 3 0 obj <> /Resources 2 0 R /Contents 4 0 R>> endobj 4 0 obj <> stream x��]]�5�}���G�%�>yk�`��nv�σ�z��kCcbf#�ǯ�Z���Tc��0m�3�O�<����R))��i�����O���w���|S��q�a�gw>:��폡C�����~g������\}�3����~��1��.L����[�]we��^>����.�_��?�߄8���MS��Н�����O?����٣���_>�������[w�'!���Z��Rߤ�5��C���_tsz����GgκG_��#�w�~��G��rv��7����z����o˕�?�|���ׯ>�BHaX�y|�[�4��2Ϡ�5���{��}�/��}�����G�V�]�y��a�S�����z~��U������ۢz��u$��V�k��HR?���{xv�������i�e��tO���y�(�����_�ʭ����q��+߿��g���B����B���}u���������~������������8���>�k�C���)����_� 66et3^k��>���_^>���o����+㥩� lr�//�Ïpʀ*l�)m�?�3� �!�7���萔���~g��x��`.O�tCm�د�M�Y�0�П%��M��2�K�a;2�n��:�)ݔ���|Cm[�����������' �����I�ܯ�M9[?�jc���}o�tI� ߹�~�n�-& m����_ι��&^ۑH<�A��i��.ǥD�����d=���̟r�}�o�3���ۼ���u��,��8�6t�nJ8�g��֏�������_���JڂL�}d:ql���a��������zF n� n}��WW���?�(>\�(������Z֛�^�ߐq�z�S��tw��'��c(wb,��t���on�pKr�w����G�>�M��f�S�����?�?��~��~���ǷuZ&ĵF�����ǷV�4�crzC��������ԯ�S���{�Uo����z��-C�����[,�zi�;�W�>>���/��>�����W��|x[o��� ��xmI�[�ڒ����E�O����1�N_�2*������vo��-�nA�[�ޒ��6����-xoQ������72ɘ�Q��m���|�Q&z��Wȓ��u�I��j�M2����&3�`�O��*�T!r�+g��N2��v�m�:9tn̮V����>��c�����a�{�_1�{^����p���{��O-��l+��l���co>�rGN-K���f�4W{��=�P���>$�M��jﱷfY/�>$�T�i��{{�a���>L���*6���co>�k���(�#��b�\�=����ԯ}���4Ul�����|HR�>�~�oI�i��{{�a�N|�s8�T�i��{{�a_B��Sl�����|�$�6Y�M��jﱷYC?��m�gx� ��jﱷ?��~��'������coo-�m�z𡤃j�X���{������}H{gy�T�i��{{�a���>�t;0Ŧ��{����=��~ƧU�i��{{�a�Z�a�e�T�i��{{�a��|�� �*6���co>�RW>����b�\�=����"?�K�a�Tl�����|�2�B?�T�i��{{�a�*�a�'���Ms���ۃC��aϑASŦ��{��O>�A�N>�@I�aլ�{���&�c'֕�BêY�=���C��U|����R�i�3?7|�a�L8�s�`�Tl�ʌ������� |eA4Ul�����|�d��0�c�b�\�=����$�&�a�\Z�i��{{�a_[�҆Ms���ۃ��`��ꤩb�\�=���Cy�p��)�M��jﱷV��Ň��+������ ����X�M��b�h<�����c�T[�\Z�jV{���ɇe���'��riêY�=���C�jA�!�<h��4W{��=���5Q'�~�X��4W{��=�� �FY�M���� ���/>̐��S?b�Tl�gO0?7���抱u�8�Vl�����|��|H�K+6���co>�Ls��d�+��jﱷJ6���R�u���Ms���ۃ+����+������ _|���eԄ�R�i<� ~n���J}��: �K+6���co�a.�S��S.�X5������ôo��䁦�U��{�������{�K?b�Tl�����|������JŦ9�x�����3����$�@SŦy���s��~��:M�K+6���co>�����`ʥ��jﱷf�f)�M��jﱷ�)��s�E�T�i��{{�a�|���Aæy���s�����@^6́��� _|��[�W�'M�M�F��s�?�m����X��4t����ao�V�u�o�aլ�{��rg0��;��R�jV{��=�!�E.æ9�x�����3���c�5l�gO?7�þs �w,��riŦy������Ň�z Y �\Z�i��b~n���M�E�Dc���M�D�(�s�e��(��6͉2���/>,����a�Q6��'���aos������6͑��� _|�(�L��bӼQV����Ň�2�P2,ʥ���2c���_|�,so�1V*V�jﱷ?� �,�ޒ����J�,���ۃ��q�5�wΰi�<� ~n���O��0��g�4/<� ~n���M��2j�\Z�iN4�e~n���D#� #?���M�D#v���/>L4� ;1q�ði�(2?7���&Μ�c�Tl�G���� _|X��8�{æy���s�"�z�C�^Ѱi�<� ~n���J�pQfs0V*6�+��1?7|�a��Đ6Υ���f��~�Af�0��Y5���U��{��O>�6qF7��f� �f���ۃ2����3]æ9�x�����d���LٺaӼ�x������Vb��riŦ9���s�&Z�L��b�lTm���*��捫툟~�A*�0�U-V�jﱷ�� �"���W4{��=��B�/>,�l�4�<� ~n���M�>�SU0�6l�#U�2?7|�a� �&Υ���*h����0Rp:U�WMU.����|��9�*ԫ��j���co>̐�w��M�L� ���/>$��ŇHU*�Ms���s���Vʥ ���꿙����>[|8�Vl��3?7��~�O��5�}6l�7��b~n���M� ���M����~�!���;��3êY�=��'��`� wc�bլ�{{�!B}����G1l�#�3?7|�a���㎱W4l�g��f~n�����Ї�j� ���*9����0�)�0r��b�\�=������0SE�a�lԂ`�Ұiި���/>�-I�<�(��x����ٳ�Qe3VI1P*V�jﱷ��f����ˢ�^N�tƠ>ҋ&���Mm������Ŋm���*w�@A�칇�5uI�~GŦ6Q�c~n�E�D�Zz`�P�N���=W�O��$)�ǰ���N��0?7��4�����^)T�#u��͞+���c�a��.��3?7��>RƲJ���H� q������$�5 �ڕ.���_��3��� U�@ #q���2�AS��0*V�jﱷ��b��Ãw ����Ag� :�LXbTlj :��~Q�иI ��IS�r47{��O4�Ki���aS�h��������F�2� o�B�;Ѱ���sE�D��f�6� ���~Q?��A!���B�;��q����p�#I�;F@Ŧv�����_�G�����7 Un���f��+M>%)y���Ԯ< ~n�i��ց����@��f�-���#�8p�Xժ����ZX6��\VJ�˩������M�x�P�� 4�������搥���܅&���=W�'�O�H���Mm�ğ����3��Ky;��*w�����s{k����#�bS;�"�s�/�GZG��vx/�ܑQ��=W�ϴ�ƅ���ڙ�����A�ĕ,)���P�&Z�"n�\Q�B>~�1.6���coRh-Qʐ�^�� ��7{���h)4I!;F@Ŧv��P����3o��+�`p��˩�����~ ���H��U��{��O�WZO�Z�W�rWZL'n�����$)%����F����~Q?SE��~�1PN�P�FJ���=Wԯ�]0Iq9F@Ŧv��������~��QJ������Qc��I���c���V�jﱷ?����]y,��Pm�;���]ݖYi K9��æ6p�O�������5sT�]Ppo�T��b�����x��D��� _rp�w-���'��`L<�1�h�։�q�"r�n�ډ"2�s×Y�P��$7=�f��3In㾴�]a��qz.����coj!rg8 ��D��#w��e!I ����8�UljW�xd~n�RN@�?�����������'U�&)��6д�a�e��� _�G�����Y���������"��b���X�Ulj���� _�;� (���.o�\x���F>I֟1b��4>��Mm�����/�H�����Nn�+@3��3�uJk8�L��E��M�H#O���/G��)@�2J�#w���!Fi�iȟ���{�ڙ�}���/�I�9L�����$)��x�xt�-I��1bJQ8F@Ŧv��f���/G��IXo�x�}p���)X���JR�7)�7ð�ݸ���������p��ޕ�}7.i�yuG��R>��H3��-���3?7|9$��.\ʻp���W�7��^i ���oŦ6RQ�s×�.�<>)�⺉��\���=���G=~r����>��Cp#������uE��:T�?����ʍ|��Uwy���//�y�;��Y������?�����]���|���������o��A,IJ� �q��w�i�� ��-���}��_ endstream endobj 1 0 obj <> endobj 5 0 obj << /Type /OCG /Name (��print) /Usage << /Print <> /View <> >> >> endobj 6 0 obj << /Type /OCG /Name (��view) /Usage << /Print <> /View <> >> >> endobj 7 0 obj <> endobj 8 0 obj <> endobj 9 0 obj <> endobj 10 0 obj <> endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 7 0 R /F2 8 0 R /F3 9 0 R /F4 10 0 R >> /XObject << >> /Properties <> /ExtGState << >> >> endobj 11 0 obj << /Creator (��HTML2PDF - TCPDF) /Producer (��TCPDF 5.0.002 \(http://www.tcpdf.org\) \(TCPDF\)) /CreationDate (D:20161128153553+05'30') /ModDate (D:20161128153553+05'30') >> endobj 12 0 obj << /Type /Catalog /Pages 1 0 R /OpenAction [3 0 R /Fit] /PageLayout /SinglePage /PageMode /UseNone /Names << >> /ViewerPreferences << /Direction /L2R >> /OCProperties <> <>]>>>> >> endobj xref 0 13 0000000000 65535 f 0000006302 00000 n 0000007029 00000 n 0000000009 00000 n 0000000175 00000 n 0000006362 00000 n 0000006481 00000 n 0000006598 00000 n 0000006704 00000 n 0000006812 00000 n 0000006919 00000 n 0000007219 00000 n 0000007469 00000 n trailer << /Size 13 /Root 12 0 R /Info 11 0 R >> startxref 7829 %%EOF
charset is not supporting and enable force download:
set header content to force download:
$response->headers->set('Content-Type', 'application/force-download');
set charset:
for HTML4: <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
for HTML5: <meta charset="utf-8">