Skip to main content

pdf_from_html

Function pdf_from_html 

Source
pub async fn pdf_from_html(
    __arg0: State<SharedPool>,
    __arg1: Json<PdfFromHtmlRequest>,
) -> Response
Expand description

Generate PDF from HTML content.

This handler converts HTML content directly to PDF without requiring a web server to host the HTML.

§Endpoint

POST /pdf/html
Content-Type: application/json

§Usage in App

Router::new().route("/pdf/html", post(pdf_from_html)).with_state(pool)