catch (Exception e) {
logger.debug("Trying to evaluate response as a PDF file... ");
try {
PdfReader reader = new PdfReader(content);
PdfContentByte cb = writer.getDirectContent();
PdfImportedPage page = writer.getImportedPage(reader, 1);
float[] tm = getTransformationMatrix(page, xPos, yPos, tableWidth, tableHeight);
cb.addTemplate(page, tm[0], tm[1], tm[2], tm[3], tm[4], tm[5]);
} catch (Exception x) {
logger.error("Error in inserting image for document " + label, e);
logger.error("Error in inserting pdf file for document " + label, x);