OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 174 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 174 Rev 180
Line 310... Line 310...
310
    public File getPDFDocumentFile() {
310
    public File getPDFDocumentFile() {
311
        final File outputPDFDirectory = DocumentLocalStorageManager.getInstance().getPDFOutputDirectory(this.templateId);
311
        final File outputPDFDirectory = DocumentLocalStorageManager.getInstance().getPDFOutputDirectory(this.templateId);
312
        return new File(outputPDFDirectory, getFileName() + ".pdf");
312
        return new File(outputPDFDirectory, getFileName() + ".pdf");
313
    }
313
    }
314
 
314
 
-
 
315
    public void printDocument(PrinterJob job) {
-
 
316
 
-
 
317
        try {
-
 
318
            final File f = getDocumentFile();
-
 
319
 
-
 
320
            if (!f.exists()) {
-
 
321
                generate(false, false, "");
-
 
322
            }
-
 
323
 
-
 
324
            final Component doc = ComptaPropsConfiguration.getOOConnexion().loadDocument(f, true);
-
 
325
            doc.printDocument(job);
-
 
326
            doc.close();
-
 
327
 
-
 
328
        } catch (Exception e) {
-
 
329
            ExceptionHandler.handle("Impossible d'imprimer le document OpenOffice", e);
-
 
330
            e.printStackTrace();
-
 
331
        }
-
 
332
    }
-
 
333
 
315
    public void exportToPdf() {
334
    public void exportToPdf() {
316
        // Export vers PDF
335
        // Export vers PDF
317
        final File fileOutOO = getDocumentFile();
336
        final File fileOutOO = getDocumentFile();
318
        final File fileOutPDF = getPDFDocumentFile();
337
        final File fileOutPDF = getPDFDocumentFile();
319
 
338