i work on aspose pdf 18.1 version
TextFragmentAbsorber accept error null point exception
- window and mac no problem
but linux centos error
Document document = new Document(fileServerProperties.getBasePath() + pdfStyleProperties.getTemplatePath());
String directoryPath = fileServerProperties.getBasePath() + pdfStyleProperties.getFontPath();
File file = new File(directoryPath);
if (file.isDirectory()) {
System.out.println("font File is a Directory");
}
else {
System.out.println("font Directory doesn't exist!!");
}
com.aspose.pdf.Document.addLocalFontPath(fileServerProperties.getBasePath() + pdfStyleProperties.getFontPath());
TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber("\\#[a-zA-Z0-9\\s\\.]+\\#"); // like
TextSearchOptions textSearchOptions = new TextSearchOptions(true);
textFragmentAbsorber.setTextSearchOptions(textSearchOptions);
try {
**document.getPages().accept(textFragmentAbsorber); <<<----**
} catch (Exception e) {
e.printStackTrace();
}
how can i using on success