rahul2104 / reactjs-pdf-reader

PDF Reader in browser for React js
MIT License
22 stars 11 forks source link

Problems when displaying a PDF from binary data #6

Open Werewolve opened 4 years ago

Werewolve commented 4 years ago

Hello, I try to display a PDF file from binary data. I get the error that my file structure isn't correct. Any suggestions how to format the data in the right format? I've tried several different ways: blob, binary array, base64 string... The data looks like that:

`%PDF-1.7 %����

2 0 obj << /Filter /FlateDecode /Length 7719

stream H��WMo�H���W�Q\���� ����L2�d�l�s�� [�̍-�2mo��>����1{�)�����իW�g���^] �_Nφauuӭ���b7��;���b���9����yn�"k˲4���y�/*�UE[�¯��Ï�9�m����9]ү/�M�] �nk~�u��9Y,ON�˹�fy}�fmeҹ��zrm�U��Yј����$���_���y6�[�ߜ�3ye*����e�k��gߝ\���ٜ��z^�啑�'3=�j2g�&+����$uYcf]��yِ֚��^�������CC�f`�,�k�Y�l��z}p��UXC7C�r�������\����G�i���gf��-��;�)�e���<[Ӂ����Z>�G��gI�G�p����w�B�6J�����c=�?��ꊏC��f�i���O�����5����84��8���X3���C�P�������a�IR�������D�AV���Lj�(����>����x��G��J�͛$-p�I�Rf�.��+��Z���pw�_���R�����&�?�X��E1J�f���b���3����F�`

Thank for you advice! Regards!

casulit commented 4 years ago

@Werewolve what's the content-type set?