[package]
name = "html2pdf-api"
version = "0.2.2"
edition = "2024"
rust-version = "1.85"
authors = ["lpfy <lpfy@msn.com>"]
license = "MIT"
description = "Thread-safe headless browser pool for high-performance HTML to PDF conversion with native Rust web framework integration."
documentation = "https://docs.rs/html2pdf-api"
homepage = "https://github.com/lpfy/html2pdf-api"
repository = "https://github.com/lpfy/html2pdf-api"
readme = "README.md"
keywords = ["browser", "chrome", "headless", "pool", "automation"]
categories = ["web-programming", "concurrency", "asynchronous"]
exclude = [".github/*"]
[features]
default = ["env-config"]
test-utils = []
env-config = ["dep:dotenvy"]
actix-integration = ["dep:actix-web", "dep:serde", "dep:serde_json", "env-config"]
rocket-integration = ["dep:rocket", "env-config"]
axum-integration = ["dep:axum", "dep:tower", "dep:serde", "dep:serde_json", "env-config"]
[dependencies]
headless_chrome = { version = "1", features = ["fetch"] }
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time", "macros"] }
log = "0.4"
thiserror = "2"
dotenvy = { version = "0.15", optional = true }
actix-web = { version = "4", optional = true }
rocket = { version = "0.5", optional = true }
axum = { version = "0.8", optional = true }
tower = { version = "0.5", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
[dev-dependencies]
tokio-test = "0.4"
env_logger = "0.11"
tokio = { version = "1", features = ["full"] }
html2pdf-api = { path = ".", features = ["test-utils"] }
[[example]]
name = "actix_web_example"
required-features = ["actix-integration"]
[[example]]
name = "rocket_example"
required-features = ["rocket-integration"]
[[example]]
name = "axum_example"
required-features = ["axum-integration"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]