QPDFXRefEntry::QPDFXRefEntry(int type, qpdf_offset_t field1, int field2) :
    type(type),
    field1(field1),
    field2(field2)
{
    if ((type < 1) || (type > 2))
    {
	throw std::logic_error(
	    "invalid xref type " + QUtil::int_to_string(type));
    }
}
QPDFXRefEntry::QPDFXRefEntry(int type, qpdf_offset_t field1, int field2) :
    type(type),
    field1(field1),
    field2(field2)
{
    if ((type < 1) || (type > 2))
    {
	throw std::logic_error(
	    "invalid xref type " + QUtil::int_to_string(type));
    }
}