OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 144 | Rev 174 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 144 Rev 156
Line 229... Line 229...
229
        } else {
229
        } else {
230
            generate(false, true, "");
230
            generate(false, true, "");
231
        }
231
        }
232
    }
232
    }
233
 
233
 
234
    private File getDocumentFile() {
234
    public File getDocumentFile() {
235
        File outputDir = DocumentLocalStorageManager.getInstance().getDocumentOutputDirectory(getDefaultTemplateID());
235
        File outputDir = DocumentLocalStorageManager.getInstance().getDocumentOutputDirectory(getDefaultTemplateID());
236
        return new File(outputDir, getFileName() + ".odt");
236
        return new File(outputDir, getFileName() + ".odt");
237
    }
237
    }
238
 
238
 
239
    public void printDocument() {
239
    public void printDocument() {
Line 300... Line 300...
300
            }
300
            }
301
        }
301
        }
302
        return init;
302
        return init;
303
    }
303
    }
304
 
304
 
-
 
305
    public File getPDFDocumentFile() {
-
 
306
        final File outputPDFDirectory = DocumentLocalStorageManager.getInstance().getPDFOutputDirectory(this.templateId);
-
 
307
        return new File(outputPDFDirectory, getFileName() + ".pdf");
-
 
308
    }
-
 
309
 
305
    public void exportToPdf() {
310
    public void exportToPdf() {
306
        // Export vers PDF
311
        // Export vers PDF
307
        final String fileName = getFileName();
-
 
308
        final File fileOutOO = getDocumentFile();
312
        final File fileOutOO = getDocumentFile();
309
        final File outputPDFDirectory = DocumentLocalStorageManager.getInstance().getPDFOutputDirectory(this.templateId);
-
 
310
        final File fileOutPDF = new File(outputPDFDirectory, fileName + ".pdf");
313
        final File fileOutPDF = getPDFDocumentFile();
311
 
314
 
312
        if (!fileOutOO.exists()) {
315
        if (!fileOutOO.exists()) {
313
            generate(false, false, "");
316
            generate(false, false, "");
314
        }
317
        }
315
        try {
318
        try {