Hi Team,
How to find the page Orientation for the particular page number. i try this below code but an exception has occurred.
My code:
LayoutCollector collector = new LayoutCollector(doc);
Iterable<Shape> shapes = doc.getChildNodes(NodeType.SHAPE, true);
for (Shape s: shapes)
{
try {
if (s.hasImage())
System.out.println(doc.getSections().get(collector.getStartPageIndex(s)).getPageSetup().getOrientation());
} catch (Exception e) {
e.printStackTrace();
}
}
Exception:
java.lang.NullPointerException
at com.wer.wsx.findImage.findLanscapeImage(findImage.java:747)
at com.wer.wsx.findImage.imageExtraction(findImage.java:668)
at com.wer.wsx.findImage.createFolderAIE(findImage.java:555)
at com.wer.wsx.findImage.main(findImage.java:182)