mirror of
https://github.com/jzillmann/pdf-to-markdown.git
synced 2024-11-22 07:43:46 +01:00
Summary for detect footnotes
This commit is contained in:
parent
55506576f5
commit
a76dac6428
@ -78,6 +78,7 @@ export default class DebugView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parseResult.content = parseResult.content.filter((elem, i) => pageNr == -1 || i == pageNr);
|
parseResult.content = parseResult.content.filter((elem, i) => pageNr == -1 || i == pageNr);
|
||||||
|
const summaryComponent = lastTransformation.createSummaryView(parseResult.summary);
|
||||||
const pageComponents = parseResult.content.map(page => lastTransformation.createPageView(page, this.state.modificationsOnly));
|
const pageComponents = parseResult.content.map(page => lastTransformation.createPageView(page, this.state.modificationsOnly));
|
||||||
const showModificationCheckbox = lastTransformation.showModificationCheckbox();
|
const showModificationCheckbox = lastTransformation.showModificationCheckbox();
|
||||||
|
|
||||||
@ -152,6 +153,7 @@ export default class DebugView extends React.Component {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
{ summaryComponent }
|
||||||
{ pageComponents }
|
{ pageComponents }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import React from 'react';
|
||||||
import ToPdfViewTransformation from './ToPdfViewTransformation.jsx';
|
import ToPdfViewTransformation from './ToPdfViewTransformation.jsx';
|
||||||
import TextItem from '../TextItem.jsx';
|
import TextItem from '../TextItem.jsx';
|
||||||
import ParseResult from '../ParseResult.jsx';
|
import ParseResult from '../ParseResult.jsx';
|
||||||
@ -11,6 +12,14 @@ export default class DetectFootnotes extends ToPdfViewTransformation {
|
|||||||
super("Detect Footnotes");
|
super("Detect Footnotes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createSummaryView(summary) {
|
||||||
|
return <div>
|
||||||
|
Detected
|
||||||
|
{ ' ' + summary.footnotes + ' ' } footnotes.
|
||||||
|
</div>;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
transform(parseResult:ParseResult) {
|
transform(parseResult:ParseResult) {
|
||||||
|
|
||||||
var nextFooterNumber = 1;
|
var nextFooterNumber = 1;
|
||||||
|
@ -21,6 +21,10 @@ export default class Transformation {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createSummaryView(summary) { // eslint-disable-line no-unused-vars
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
createPageView(page, modificationsOnly) { // eslint-disable-line no-unused-vars
|
createPageView(page, modificationsOnly) { // eslint-disable-line no-unused-vars
|
||||||
throw new TypeError("Do not call abstract method foo from child.");
|
throw new TypeError("Do not call abstract method foo from child.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user