Function pdfs::parsePDFDescriptor

Function Documentation

auto pdfs::parsePDFDescriptor(const std::string &fileName) -> PDF

Construct a PDF object from a descriptor file.

fileName may point to either of the two descriptor formats this library understands: the toml-based format described in parsePDFToml()’s own doc comment, or the older, custom format described in parsePDFLegacy()’s own doc comment. This function determines which format fileName uses by first attempting to parse it as toml; if that succeeds, the result is handed off to parsePDFToml(), and otherwise fileName is assumed to be in the legacy format and is handed off to parsePDFLegacy() instead.

Parameters:

fileName – Name of the file

Returns:

A PDF object constructed from the file