[−][src]Crate pstoedit
Rust bindings to pstoedit.
This crate contains Rust bindings to pstoedit, a C++ program that can translate PostScript and PDF graphics into other vector formats.
Usage
First, the init
function must be called. Then, interaction with pstoedit
is possible using Command
or DriverInfo
.
Examples
use pstoedit::{DriverInfo, Command}; pstoedit::init()?; // For every driver ... for driver in &DriverInfo::get()? { let format = driver.symbolic_name()?; let extension = driver.extension()?; let output_name = format!("output-{}.{}", format, extension); // ... convert input.ps to that format Command::new().args_slice(&["-f", format, "input.ps"])?.arg(output_name)?.run()?; }
Re-exports
pub use driver_info::DriverInfo; |
Modules
driver_info | Information on pstoedit drivers. |
Structs
Command | Command builder for generic pstoedit interaction. |
Enums
Error | Enumerations of possible errors during interaction with pstoedit. |
Functions
init | Initialize connection to pstoedit. Must be called before calling any other function that requires a connection to pstoedit. |
Type Definitions
Result | Type of the result returned by many methods. |