Open Rahmathirshad opened 6 months ago
I recieved this response -> {"_data": {"__collector": {}, "blobId": "23ffc5c3-ace3-492b-864f-ae04780955bc", "offset": 0, "size": 3028}}
then I convert response to base64: const reader = new FileReader; reader.onerror = () => console.log("reject"); reader.onload = () => { console.log(reader.result); // data:application/octetstream;base64,JVBERi0xLjMNCiXi48/TDQoNCjE.... setPdfData(reader.result); }; reader.readAsDataURL(response.data);
const source = {uri: pdfData, cache: true};
after all of this I'm getting white blank screen
You need to replace data:application/octet-stream with data:application/pdf
data:application/octet-stream
data:application/pdf
I recieved this response -> {"_data": {"__collector": {}, "blobId": "23ffc5c3-ace3-492b-864f-ae04780955bc", "offset": 0, "size": 3028}}
then I convert response to base64: const reader = new FileReader; reader.onerror = () => console.log("reject"); reader.onload = () => { console.log(reader.result); // data:application/octetstream;base64,JVBERi0xLjMNCiXi48/TDQoNCjE.... setPdfData(reader.result); }; reader.readAsDataURL(response.data);
const source = {uri: pdfData, cache: true};
after all of this I'm getting white blank screen