SA MARCHE

This commit is contained in:
LucasV-IUT
2021-11-28 20:46:50 +01:00
parent 555c1006cd
commit 0ce4f8ed85
5 changed files with 187 additions and 164 deletions
+6 -7
View File
@@ -43,15 +43,14 @@ public class PDF extends JPanel {
* @param fichier Le fichier PDF que lon veut ouvrir
* @throws IllegalArgumentException si le fichier nexiste pas
*/
public PDF(File fichier) throws IOException {
if (!fichier.exists()) {
public PDF(File fichier) {
try {
this.document = PDDocument.load(fichier);
this.pages = new Page[document.getNumberOfPages()];
this.loadPages();
} catch (IOException e) {
throw new IllegalArgumentException();
}
this.document = PDDocument.load(fichier);
this.pages = new Page[document.getNumberOfPages()];
this.loadPages();
}
/**