diff --git a/sapl/materia/views.py b/sapl/materia/views.py index bbf96e87e..918749a3d 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -1791,6 +1791,7 @@ def gerar_pdf_impressos(request, context, template_name): response = HttpResponse(pdf, content_type='application/pdf') response['Content-Disposition'] = ( 'inline; filename="relatorio_impressos.pdf"') + response['Content-Transfer-Encoding'] = 'binary' return response diff --git a/sapl/norma/views.py b/sapl/norma/views.py index 1f7ea286a..6490b816e 100644 --- a/sapl/norma/views.py +++ b/sapl/norma/views.py @@ -239,6 +239,9 @@ def gerar_pdf_impressos(request, context, template_name): response = HttpResponse(pdf, content_type='application/pdf') response['Content-Disposition'] = ( 'inline; filename="relatorio_impressos.pdf"') + response['Content-Transfer-Encoding'] = 'binary' + + return response class NormaPesquisaSimplesView(PermissionRequiredMixin, FormView): form_class = NormaPesquisaSimplesForm