How can I load and render a thousand of pages or a big file when I make the PDF to a buffered image?
This is the implementation: View model Class: private static final int CACHE_SIZE = 10; // Set cache size to 10 pages to avoid excessive memory usage public PdfViewModel() { currentPage.addListener((obs, oldPage, newPage) -> { if (newPage.intValue() >= 0 && newPage.intValue() < pages.size()) { loadPage(newPage.intValue()); } }); } public void loadPdf(File file) throws IOException { pdfDocument […]
How can I load and render a thousand of pages or a big file when I make the PDF to a buffered image?
This is the implementation: View model Class: private static final int CACHE_SIZE = 10; // Set cache size to 10 pages to avoid excessive memory usage public PdfViewModel() { currentPage.addListener((obs, oldPage, newPage) -> { if (newPage.intValue() >= 0 && newPage.intValue() < pages.size()) { loadPage(newPage.intValue()); } }); } public void loadPdf(File file) throws IOException { pdfDocument […]
How can I load and render a thousand of pages or a big file when I make the PDF to a buffered image?
This is the implementation: View model Class: private static final int CACHE_SIZE = 10; // Set cache size to 10 pages to avoid excessive memory usage public PdfViewModel() { currentPage.addListener((obs, oldPage, newPage) -> { if (newPage.intValue() >= 0 && newPage.intValue() < pages.size()) { loadPage(newPage.intValue()); } }); } public void loadPdf(File file) throws IOException { pdfDocument […]