Amendments to comply with pdf2htmlEX strange output logic