class

Crowbar::Rules::PDFRule

Inherits Crowbar::Rule < Reference < Object

Structure-preserving rule for Portable Document Format (PDF) files. Preserves %PDF- header, indirect object framing (N 0 obj ... endobj), stream delimiters (stream ... endstream), and trailer xref offsets, while mutating dictionary keys/values, numeric bounds, filters, and stream bodies.

Constants

PDF_MAGIC = "%PDF-".to_slice

Instance methods

apply(context : Context, buffer : Buffer) : Bool

Applies a structure-preserving transformation to the buffer

Source
description
Source
match?(buffer : Buffer) : Bool

Checks whether the buffer matches the format handled by this rule

Source
name
Source