I want to add an image to a pdf file, the images are in the static directory:
'static/images/logo.png'
Settings file:
STATIC_URL = '/static/'
Part of the Code:
from borb.pdf.canvas.layout.image.image import Image
page_layout.add(
Image(
"/static/images/logo.png",
width=Decimal(128),
height=Decimal(128),
))
Error Code:
MissingSchema: Invalid URL '/static/images/Logo.png': No schema supplied. Perhaps you meant http:///static/images/Logo.png?
I do not want to show it in a front end template, instead is a backend function to generate pdfs.
Do i have to provide/generate any kind of url link to the Image function?? how to do it?
Thanks !