For non-compliant PDFs, output intent structure may be missing. Rather than logging an error, just debug and return.
Also use the correct logger.exception() instead of error so
the full exception gets logged.
"/DestOutputProfile"
].get_object()
output_intents.append((ori_output_intent_dict, dest_output_profile_dict))
+ except KeyError as ex:
+ logger.debug("Data missing from PDF: %s", ex)
except Exception as ex:
- logger.error(ex)
+ logger.exception(ex)
return output_intents