Subversion Repositories SmartDukaan

Rev

Rev 490 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 490 Rev 734
Line 36... Line 36...
36
	
36
	
37
	public HttpHeaders show(){
37
	public HttpHeaders show(){
38
		System.out.println("Order Id is:  " + getId());
38
		System.out.println("Order Id is:  " + getId());
39
		this.orderId = Long.parseLong(getId());
39
		this.orderId = Long.parseLong(getId());
40
		
40
		
-
 
41
		InvoiceGenerationService invoiceGenerationService = new InvoiceGenerationService();
41
		ByteArrayOutputStream baos = InvoiceGenerationService.generateInvoice(orderId);
42
		ByteArrayOutputStream baos = invoiceGenerationService.generateInvoice(orderId);
42
		response.setContentType("application/pdf");
43
		response.setContentType("application/pdf");
43
		response.setHeader("Content-disposition", "inline; filename=invoice-"+orderId+".pdf" );
44
		response.setHeader("Content-disposition", "inline; filename=invoice-"+orderId+".pdf" );
44
		
45
		
45
		ServletOutputStream sos;
46
		ServletOutputStream sos;
46
		try {
47
		try {