package server import ( "github.com/labstack/echo/v4" "github.com/rjNemo/rentease/internal/pdf" ) func handleCreateInvoicePdf(ps *pdf.PdfService) echo.HandlerFunc { return func(c echo.Context) error { err := ps.BuildInvoice() if err != nil { return err } return c.Attachment("tmp.pdf", "tmp.pdf") } }