[package] name = "pdfium-render" version = "0.8.26" edition = "2018" rust-version = "1.61" publish = true description = "A high-level idiomatic Rust wrapper around Pdfium, the C++ PDF library used by the Google Chromium project." readme = "README.md" homepage = "https://github.com/ajrcarey/pdfium-render" repository = "https://github.com/ajrcarey/pdfium-render" license = "MIT OR Apache-2.0" keywords = ["pdf", "pdfium"] categories = ["api-bindings", "multimedia::images", "visualization", "wasm"] authors = ["Alastair Carey "] exclude = ["test/*.pdf"] [lib] name = "pdfium_render" crate-type = ["lib", "staticlib", "cdylib"] doctest = false [dependencies] bitflags = "2" bytes = "1" bytemuck = "1" chrono = "0" image_025 = { package = "image", version = "0.25", optional = true } image_024 = { package = "image", version = "0.24", optional = true } image_023 = { package = "image", version = "0.23", optional = true } itertools = "0" log = "0" maybe-owned = "0" once_cell = "1" utf16string = "0" vecmath = "1" [target.'cfg(target_arch = "wasm32")'.dependencies] console_log = "1" console_error_panic_hook = "0" js-sys = "0" wasm-bindgen = { version = "0", features = ["enable-interning"] } wasm-bindgen-futures = { version = "0" } web-sys = { version = "0", features = [ "TextDecoder", "ImageData", "Window", "Response", "Blob", ] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] libloading = "0" [target.'cfg(target_os = "windows")'.dependencies] windows = { version = "0", optional = true } [build-dependencies] # Bindgen 0.70.0 and later cause build failures when compiling to WASM. For more details, see: # https://github.com/ajrcarey/pdfium-render/issues/157 bindgen = { version = "<=0.69.4", optional = true } [dev-dependencies] # Dependencies specific to examples. Dependencies for the WASM example in examples/wasm.rs # are specified separately in examples/Cargo.toml. rand = "0" # Used by examples/create.rs, examples/matrix.rs rayon = "1" # Used by examples/thread_safe.rs [features] default = ["pdfium_latest", "thread_safe", "image"] image = ["image_latest"] # A synonym for backwards compatibility bindings = ["dep:bindgen"] static = [] thread_safe = [] "libstdc++" = ["static"] "libc++" = ["static"] sync = ["thread_safe"] paragraph = [] flatten = [] # By default, pdfium-render uses the latest version of the image crate. To explicitly use # an older version, select one of the feature flags below when taking pdfium-render as # a dependency in your project's Cargo.toml. image_latest = ["image_025"] image_025 = ["dep:image_025"] image_024 = ["dep:image_024"] image_023 = ["dep:image_023"] # PdfiumLibraryBindings supports pinning its API definitions to a specific Pdfium release. # This allows pdfium-render consumers to safely upgrade their pdfium-render dependency without # having to simultaneously upgrade their Pdfium dependency. # By default, pdfium-render attempts to bind against the latest released version of the Pdfium API. # To explicitly bind against an older version, select one of the feature flags below when # taking pdfium-render as a dependency in your project's Cargo.toml. pdfium_latest = ["pdfium_6721"] pdfium_future = [ # For testing changes in Pdfium source control that are yet to be released. "pdfium_use_skia", "pdfium_enable_xfa", "pdfium_enable_v8", ] pdfium_6721 = [] pdfium_6666 = [] pdfium_6611 = [] pdfium_6569 = [] pdfium_6555 = [] pdfium_6490 = [] pdfium_6406 = [] pdfium_6337 = [] pdfium_6295 = [] pdfium_6259 = [] pdfium_6164 = [] pdfium_6124 = [] pdfium_6110 = [] pdfium_6084 = [] pdfium_6043 = [] pdfium_6015 = [] pdfium_5961 = [] # Certain Pdfium API functions are only made available when compile time flags are set # when the Pdfium binary is compiled. The features below make these functions available # in PdfiumLibraryBindings. They correspond to the Pdfium compile time flags # _WIN32, PDF_USE_SKIA, PDF_ENABLE_XFA, and PDF_ENABLE_V8. pdfium_use_win32 = ["dep:windows"] pdfium_use_skia = [] pdfium_enable_xfa = [] pdfium_enable_v8 = []