Subversion Repositories SmartDukaan

Rev

Rev 7318 | Rev 7528 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7318 Rev 7422
Line 340... Line 340...
340
			logoTable.addCell(logoCell);
340
			logoTable.addCell(logoCell);
341
		
341
		
342
		}
342
		}
343
		
343
		
344
		if(order.getSource() == OrderSource.STORE.getValue()){
344
		if(order.getSource() == OrderSource.STORE.getValue()){
345
			logoPath = InvoiceGenerationService.class.getResource("/Hotspot-Logo.jpg").getPath();
345
			logoCell = new PdfPCell(new Phrase(""));
346
			
346
			
347
			try {
-
 
348
				logoCell = new PdfPCell(Image.getInstance(logoPath), false);
-
 
349
			} catch (Exception e) {
-
 
350
				//Too Many exceptions to catch here: BadElementException, MalformedURLException and IOException
-
 
351
				logger.warn("Couldn't load the Saholic logo: ", e);
-
 
352
				logoCell = new PdfPCell(new Phrase("Hotspot Logo"));
-
 
353
			}
-
 
354
			logoCell.setBorder(Rectangle.NO_BORDER);
347
			logoCell.setBorder(Rectangle.NO_BORDER);
355
			logoCell.setHorizontalAlignment(Element.ALIGN_LEFT);
348
			logoCell.setHorizontalAlignment(Element.ALIGN_LEFT);
356
			
349
			
357
			logoTable.addCell(logoCell);
350
			logoTable.addCell(logoCell);
358
		
-
 
359
			logoPath = InvoiceGenerationService.class.getResource("/Saholic-Logo.jpg").getPath();
-
 
360
			
-
 
361
			try {
-
 
362
				logoCell = new PdfPCell(Image.getInstance(logoPath), false);
-
 
363
			} catch (Exception e) {
-
 
364
				//Too Many exceptions to catch here: BadElementException, MalformedURLException and IOException
-
 
365
				logger.warn("Couldn't load the Saholic logo: ", e);
-
 
366
				logoCell = new PdfPCell(new Phrase("Saholic Logo"));
-
 
367
			}
-
 
368
			logoCell.setBorder(Rectangle.NO_BORDER);
-
 
369
			logoCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
-
 
370
			logoTable.addCell(logoCell);
-
 
371
			
-
 
372
		}
351
		}
373
	}
352
	}
374
 
353
 
375
	private Font getBarCodeFont(Provider provider, float barcodeFontSize) {
354
	private Font getBarCodeFont(Provider provider, float barcodeFontSize) {
376
		String fontPath = InvoiceGenerationService.class.getResource("/" + provider.getName().toLowerCase() + "/barcode.TTF").getPath();
355
		String fontPath = InvoiceGenerationService.class.getResource("/" + provider.getName().toLowerCase() + "/barcode.TTF").getPath();