I am integrating a get API using fetch. The response is a PDF file, I want to parse it and display in the same window (maybe in a pop-up) to the user. The response I am getting looks like below -
%PDF-1.4
%����
1 0 obj
<<
/Type /Catalog
/Version /1.7
/Pages 2 0 R
>>
endobj
3 0 obj
<<
/CreationDate (D:20220923024028+00'00')
/Producer (openhtmltopdf.com)
>>
endobj
2 0 obj
<<
/Type /Pages
/Kids [4 0 R 5 0 R]
/Count 2
>>
endobj
4 0 obj
<<
/Type /Page
/MediaBox [0.0 0.0 595.275 841.875]
/Parent 2 0 R
/Contents 6 0 R
/Resources 7 0 R
/Annots [8 0 R]
>>
endobj
5 0 obj
<<
/Type /Page
/MediaBox [0.0 0.0 595.275 841.875]
/Parent 2 0 R
/Contents 9 0 R
/Resources 10 0 R
>>
endobj
6 0 obj
<<
/Length 2084
/Filter /FlateDecode
>>
stream
x��XKsܸ��W��ݪ�K����D���*9�$W�9P��3��i���$��ո|�����_?ei&͞���d���g�&���,c����Y�鴄�!ѺJE�3ᱞ`27�T �� �%�Or�!�o���EZi�WyZ�\Hq�NsUV�s|�LRi�3X�uZp�.@M��T��*��TD�<���ʔs�a)�
Could anybody please help me.