Subversion Repositories SmartDukaan

Rev

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

Rev 17419 Rev 17422
Line 86... Line 86...
86
				poTable.addCell("-------------------------");
86
				poTable.addCell("-------------------------");
87
			}
87
			}
88
 
88
 
89
            document.add(poTable);
89
            document.add(poTable);
90
            document.close();
90
            document.close();
-
 
91
            baosPDF.close();
91
        } catch (Exception e) {
92
        } catch (Exception e) {
92
            logger.error("Error while generating Invoice: ", e);
93
            logger.error("Error while generating Invoice: ", e);
93
            e.printStackTrace();
94
            e.printStackTrace();
94
        }
95
        }
95
 
-
 
-
 
96
		String tmpDir = System.getProperty("java.io.tmpdir");
-
 
97
        String filename = tmpDir + "/item-" + itemId +"-" +System.currentTimeMillis() + ".pdf";
-
 
98
        File f = new File(filename);
-
 
99
        FileOutputStream fos = new FileOutputStream(f);
-
 
100
        baosPDF.writeTo(fos);
96
        return baosPDF;
101
        return baosPDF;
97
	}
102
	}
98
	/*
103
	/*
99
	public static void main(String[] args) throws IOException{
104
	public static void main(String[] args) throws IOException{
100
		ByteArrayOutputStream baosPDF = null;
105
		ByteArrayOutputStream baosPDF = null;