diff --git a/InvenTree/label/api.py b/InvenTree/label/api.py index c8b265fd93..2ee8445d2e 100644 --- a/InvenTree/label/api.py +++ b/InvenTree/label/api.py @@ -110,6 +110,7 @@ class LabelPrintMixin: pdf = outputs[0].get_document().write_pdf() inline = common.models.InvenTreeUserSetting.get_setting('LABEL_INLINE', user=request.user) + return InvenTree.helpers.DownloadFile( pdf, label_name, diff --git a/InvenTree/report/api.py b/InvenTree/report/api.py index f09a52f272..2129b31627 100644 --- a/InvenTree/report/api.py +++ b/InvenTree/report/api.py @@ -254,10 +254,13 @@ class ReportPrintMixin: else: pdf = outputs[0].get_document().write_pdf() + inline = common.models.InvenTreeUserSetting.get_setting('REPORT_INLINE', user=request.user) + return InvenTree.helpers.DownloadFile( pdf, report_name, - content_type='application/pdf' + content_type='application/pdf', + inline=inline, )