| Line 355... |
Line 355... |
| 355 |
logoTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
|
355 |
logoTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
|
| 356 |
logoTable.getDefaultCell().setVerticalAlignment(Element.ALIGN_BOTTOM);
|
356 |
logoTable.getDefaultCell().setVerticalAlignment(Element.ALIGN_BOTTOM);
|
| 357 |
|
357 |
|
| 358 |
PdfPCell logoCell;
|
358 |
PdfPCell logoCell;
|
| 359 |
String logoPath;
|
359 |
String logoPath;
|
| 360 |
logger.info("Order Source Value.........",order.getSource());
|
360 |
logger.info("Order Source Value........."+order.getSource());
|
| 361 |
if(order.getSource() == OrderSource.STORE.getValue()){
|
361 |
if(order.getSource() == OrderSource.STORE.getValue()){
|
| 362 |
logoCell = new PdfPCell(new Phrase(""));
|
362 |
logoCell = new PdfPCell(new Phrase(""));
|
| 363 |
|
363 |
|
| 364 |
}else{
|
364 |
}else{
|
| 365 |
logoPath = InvoiceGenerationService.class.getResource("/logo.jpg").getPath();
|
365 |
logoPath = InvoiceGenerationService.class.getResource("/logo.jpg").getPath();
|
| 366 |
logger.info("Logo Path.........",logoPath);
|
366 |
logger.info("Logo Path........."+logoPath);
|
| 367 |
try {
|
367 |
try {
|
| 368 |
logoCell = new PdfPCell(Image.getInstance(logoPath), false);
|
368 |
logoCell = new PdfPCell(Image.getInstance(logoPath), false);
|
| 369 |
} catch (Exception e) {
|
369 |
} catch (Exception e) {
|
| 370 |
//Too Many exceptions to catch here: BadElementException, MalformedURLException and IOException
|
370 |
//Too Many exceptions to catch here: BadElementException, MalformedURLException and IOException
|
| 371 |
logger.warn("Couldn't load the Saholic logo: ", e);
|
371 |
logger.warn("Couldn't load the Saholic logo: ", e);
|