pub struct PostScriptBoxes {
pub bounding_box: Option<(f64, f64, f64, f64)>,
pub hires_bounding_box: Option<(f64, f64, f64, f64)>,
}Expand description
The DSC bounding-box comments of a PostScript file (Adobe DSC 3.0:
%%BoundingBox:, %%HiResBoundingBox:, (atend)), as (llx, lly, urx, ury)
in bp.
A comment line is ASCII, but its neighbours need not be text: a Latin-1
%%Title, a binary preview, a multi-byte character cut at the window’s
edge. So the file is scanned as bytes, in lines ending at CR, LF or CRLF.
Only the header window (the first 32 KB, PS_COMMENT_WINDOW) is read, and
the trailer window too when the box is deferred with (atend). The first
%%BoundingBox: line decides, as in graphics.sty (\Gread@eps, 391-399)
and epstopdf; after (atend) the trailer’s last box wins, as DSC and
graphics.sty read it. Comments inside an embedded document
(%%BeginDocument .. %%EndDocument) are its own, not the file’s, and are
skipped. A DOS EPS binary header (C5 D0 D3 C6, then the PostScript
section’s offset and length, little-endian) is followed to its PostScript
section. pdflatex (through epstopdf) sizes a Latin-1, a CR-only, an
(atend) and a DOS EPS alike; repro graphics-tikz/eps_bounding_box_bytes.tex.
Fields§
§bounding_box: Option<(f64, f64, f64, f64)>§hires_bounding_box: Option<(f64, f64, f64, f64)>