Function pdfs::parsePDFTomlString

Function Documentation

auto pdfs::parsePDFTomlString(const std::string &descriptor) -> PDF

Construct a PDF object from a toml-format PDF descriptor held in a string.

Parses descriptor as toml, then hands the result to parsePDFToml(); see that function’s own doc comment for the descriptor format.

Parameters:

descriptor – The text of a toml PDF descriptor, e.g. as returned by PDF::toToml()

Throws:

std::runtime_error – if descriptor is not valid toml, or not a valid PDF descriptor

Returns:

A PDF object constructed from descriptor