Hi,
Parsing always goes through the whole document and load the structure.
But rendering will only render (and use additional space for images) the
page itself.
Tilman
Am 05.08.2014 10:29, schrieb Hong-Thai Nguyen:
Thank Tilman for reply.
I want to load only 1st page of a PDFDocument in order to generate its
thumbnail:
PDDocument document = PDDocument.loadNonSeq(localFile, null);
PDPage page = (PDPage) document.getDocumentCatalog().getAllPages().get(0);
try {
BufferedImage image = page.convertToImage(BufferedImage.TYPE_INT_RGB,
resolution);
return image;
} finally {
page = null;
}
I'm interesting only the 1st page but I need to load all pages of documents,
that's not really optimize on big documents.
My question is: is there a possibility to build PDDocument with a PDPage of 1st
page only ?
Regards,
Hong-Thai
-----Message d'origine-----
De : Tilman Hausherr [mailto:[email protected]]
Envoyé : lundi 4 août 2014 20:11
À : [email protected]
Objet : Re: Load only 1 page of PDF Document
It is news to me that you can load several pages in one PDPage object.
Are you sure you're writing about PDFBox?
Tilman
Am 04.08.2014 18:11, schrieb Hong-Thai Nguyen:
Hi all,
Is there a possibility to load only 1 page of PDF document to PDPage ?
Thanks,
Hong-Thai