Apache PDFBox refuses to open temporary created PDF file
问题 I am creating desktop JavaFX application for viewing PDF files. PDFs are at resource folder. I read resourse file as stream, then I create temporary file and use it to convert contents to image and show into ImageView. currentPdf = new File("current.pdf"); if (!currentPdf.exists()) { // In JAR InputStream inputStream = ClassLoader.getSystemClassLoader() .getResourceAsStream("PDFSample.pdf"); // Copy file OutputStream outputStream; try { outputStream = new FileOutputStream(currentPdf); } catch