Hello ...groubdoc viewers family...
i meet a problem when i want to view document information for the given file which selected from JFilechooser ...the file contains 16 page (the file is pdf file) but the program will generate only the first two page so i don't know where the error
//defaultDirectory is default system diractory
ViewerConfig config=new ViewerConfig();
config.setStoragePath(defaultDirectory);
// config.setTempFolderName(defaultDirectory+"\\Temp");
ViewerHtmlHandler handler=new ViewerHtmlHandler(config);
JFileChooser jc=new JFileChooser();
if(jc.showOpenDialog(null)==JFileChooser.APPROVE_OPTION){
DocumentInfoContainer container=handler.getDocumentInfo(jc.getSelectedFile().getAbsolutePath());
for(PageData pd:container.getPages()){
System.out.println("Page Number is "+pd.getNumber());
System.out.println("Pahe Name is "+pd.getName());
}
}
The out Put will be:
Page Number is 1
Pahe Name is null
Page Number is 2
Pahe Name is null
Best Wishes