我正在使用reportlab pdfgen创建PDF。在PDF中有一个由drawImage
创建的图像。为此,我需要图像的URL或视图中图像的路径。我设法构建了URL,但是如何获得图像的本地路径呢?
如何获取URL:
prefix = 'https://' if request.is_secure() else 'http://'
image_url = prefix + request.get_host() + STATIC_URL + "images/logo_80.png"
https://stackoverflow.com/questions/11721818
复制相似问题