Here is a react-pdf
example, and https://storage.googleapis.com/cbb_logos/conf_logos/conf-1-logo.png
is a link to an image that is publicly hosted on GCS. Per GCS, "Anyone with this link can access the object on the public internet"
However, if i copy the link into line 11 in the react-pdf
example, the image does not display. Per the docs for their image component, it clearly says: A React component for displaying network or local (Node only) JPG or PNG images, as well as base64 encoded image strings.
Simply put, am I out of luck on this, or is there another way to get hosted images in react-pdf? Perhaps another JS library is better for this? I don't think it's a good idea to save this image locally to my app, as I have 1000 more logos and that would increase my apps size by quite a bit.
Edit1: I gave a quick try using jsPDF using this stackblitz (not mine) https://stackblitz.com/edit/react-w5qb9a?file=src%2FApp.js
I dropped this div
<div style={{ maxWidth: '40px' }}>
<img
style={{width: '100%' }}
src='https://storage.googleapis.com/cbb_logos/conf_logos/conf-1-logo.png'
/>
</div>
...under the p-tag, then downloaded the PDF, and the image also did not appear. So I am still looking for a solution.