Closed
Description
According to the docs, after pdfmake 0.1.67, external image with http or https URL is supported.
I think it would be possible to extract all src
from <img />
elements to generate the images
field in docDefinition
.
const docDefinition = {
content: [
{
// if you reuse the same image in multiple nodes,
// you should put it to to images dictionary and reference it by name
image: 'mySuperImage'
},
{
// in browser is supported loading images via url from reference by name in images
image: 'snow'
},
],
images: {
mySuperImage: 'data:image/jpeg;base64,...content...',
// in browser is supported loading images via url (https or http protocol) (minimal version: 0.1.67)
snow: 'https://picsum.photos/seed/picsum/200/300'
}
Metadata
Metadata
Assignees
Labels
No labels