pub fn parse_header(
source: &[u8],
mode: ParsingMode,
) -> Result<(PdfVersion, u64), PdfError>Expand description
Parse the PDF header from the beginning of the source data.
Returns the detected version and the byte offset immediately after the header line (after the trailing newline, if present).
In lenient mode, allows garbage bytes before the header and extra whitespace. In strict mode, the header must appear at byte 0.