module

Bon::PDF

Constants

BOX_PATTERN = /\/(?:CropBox|MediaBox)\s*\[\s*([-+]?\d*\.?\d+)\s+([-+]?\d*\.?\d+)\s+([-+]?\d*\.?\d+)\s+([-+]?\d*\.?\d+)\s*\]/
CROP_EPSILON_PT = 0.1

Class methods

crop_page_to_width(source : String, output : String, target_width : Float64, page_number : Int32, size : PageSize, dry_run : Bool, output_io : IO = STDOUT, error_io : IO = STDERR, verbose : Verbose | Nil = nil) : String
Source
crop_to_raster(source : String, output : String, source_size : PageSize, target_size : PageSize, ppi : Int32, multiplier : Int32, dry_run : Bool, output_io : IO = STDOUT, error_io : IO = STDERR, threshold = 0.125, dither = "none", verbose : Verbose | Nil = nil) : String
Source
crop_to_width(source : String, output : String, target_width : Float64, dry_run : Bool, output_io : IO = STDOUT, error_io : IO = STDERR, verbose : Verbose | Nil = nil) : String
Source
downsample_grayscale_to_mono(source : String, output : String, multiplier : Int32, threshold = 0.125, dither = "none") : Nil
Source
ensure_width_policy(path : String, output : String, config : Config, no_crop : Bool, dry_run : Bool, output_io : IO = STDOUT, error_io : IO = STDERR, verbose : Verbose | Nil = nil) : String
Source
first_page_size(path : String) : PageSize
Source
format_points(value : Float64) : String
Source
page_sizes(path : String) : Array(PageSize)
Source
pixels_to_points(pixels : Int32, ppi : Int32) : Float64
Source
points_to_pixels(points : Float64, ppi : Int32) : Int32
Source
prepare_for_print(path : String, output : String, config : Config, no_crop : Bool, dry_run : Bool, output_io : IO = STDOUT, error_io : IO = STDERR, verbose : Verbose | Nil = nil) : PrintReady
Source
prepare_pages_for_print(path : String, output_prefix : String, config : Config, no_crop : Bool, dry_run : Bool, output_io : IO = STDOUT, error_io : IO = STDERR, verbose : Verbose | Nil = nil) : Array(PrintReady)
Source
raster_crop_command(gs : String, source : String, output : String, source_size : PageSize, target_size : PageSize, ppi : Int32, grayscale = false) : Array(String)
Source
split_page(source : String, output : String, page_number : Int32, dry_run : Bool, output_io : IO = STDOUT, error_io : IO = STDERR, verbose : Verbose | Nil = nil) : String
Source
threshold_to_mono(darkness : Int32, samples : Int32, x : Int32, y : Int32, threshold : Float64, dither : String) : UInt8
Source
verify_png_size(path : String, expected_width : Int32, expected_height : Int32) : Nil
Source
write_mono_png(path : String, width : Int32, height : Int32, grayscale : Bytes) : Nil
Source

Nested types