Create a response with a PDF file response. It receives a string with the PDF content and set the Content-Type header to application/pdf; charset=utf-8 always.
application/pdf; charset=utf-8
This is useful to dynamically create a PDF file from a Resource Route.
export async function loader({ request }: Route.LoaderArgs) { return pdf(await generatePDF(request.formData()));} Copy
export async function loader({ request }: Route.LoaderArgs) { return pdf(await generatePDF(request.formData()));}
Create a response with a PDF file response. It receives a string with the PDF content and set the Content-Type header to
application/pdf; charset=utf-8always.This is useful to dynamically create a PDF file from a Resource Route.