Skip to main content

pdf_from_url

Function pdf_from_url 

Source
pub async fn pdf_from_url(
    __arg0: State<SharedPool>,
    __arg1: Query<PdfFromUrlRequest>,
) -> Response
Expand description

Generate PDF from a URL.

This handler converts a web page to PDF using the browser pool.

§Endpoint

GET /pdf?url=https://example.com&filename=output.pdf

§Usage in App

Router::new().route("/pdf", get(pdf_from_url)).with_state(pool)