Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.0.24
-
None
-
None
Description
Please consider making Please consider making LegacyPDFStreamEngine public.
This will allow extending the class.
At the moment, one needs to copy the entire class sources into their own local version and making a public version of the copy if one wishes to extend it.
This also in turn makes creating a local copy of PDFTextStripper necessary so it can inherit from the local copy of LegacyPDFStreamEngine.
One reason someone would want to extend it (my example):For my needs, I have had to change the implementation of:
public void processPage(PDPage page):
in my case I have had to change the implementation (this is particular to my needs, but hopefully highlights the usefulness, and why it would potentially be needed):
try { super.processPage(page); } catch(MissingOperandException e) { // we need to catch this, because it is acceptable, we will deal with this particular error by cleaning the PDF. throw new PdfLoadingException(e.getMessage(), e); } catch(Exception e) { //we ignore all other errors and keep going because we are OK with that for our purposes. }