update #5
1 changed files with 3 additions and 0 deletions
|
@ -140,6 +140,9 @@ public class ExtractImagesController {
|
||||||
Set<Integer> processedImages,
|
Set<Integer> processedImages,
|
||||||
ZipOutputStream zos)
|
ZipOutputStream zos)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
if(page.getResources() == null || page.getResources().getXObjectNames() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (COSName name : page.getResources().getXObjectNames()) {
|
for (COSName name : page.getResources().getXObjectNames()) {
|
||||||
if (page.getResources().isImageXObject(name)) {
|
if (page.getResources().isImageXObject(name)) {
|
||||||
PDImageXObject image = (PDImageXObject) page.getResources().getXObject(name);
|
PDImageXObject image = (PDImageXObject) page.getResources().getXObject(name);
|
||||||
|
|
Loading…
Reference in a new issue