|
13 | 13 | */
|
14 | 14 | public class BaseTable extends Table<PDPage> {
|
15 | 15 |
|
16 |
| - public BaseTable(float yStart, float yStartNewPage, float bottomMargin, float width, float margin, PDDocument document, PDPage currentPage, boolean drawLines, boolean drawContent) throws IOException { |
17 |
| - super(yStart, yStartNewPage, 0, bottomMargin, width, margin, document, currentPage, drawLines, drawContent, new DefaultPageProvider(document, currentPage.getMediaBox())); |
| 16 | + public BaseTable(float yStart, float yStartNewPage, float bottomMargin, float width, float margin, |
| 17 | + PDDocument document, PDPage currentPage, boolean drawLines, boolean drawContent) throws IOException { |
| 18 | + this(yStart, yStartNewPage, 0, bottomMargin, width, margin, document, currentPage, drawLines, drawContent, newPageProvider(document, currentPage)); |
18 | 19 | }
|
19 |
| - |
20 |
| - public BaseTable(float yStart, float yStartNewPage, float pageTopMargin, float bottomMargin, float width, float margin, PDDocument document, PDPage currentPage, boolean drawLines, boolean drawContent) throws IOException { |
21 |
| - super(yStart, yStartNewPage, pageTopMargin, bottomMargin, width, margin, document, currentPage, drawLines, drawContent, new DefaultPageProvider(document, currentPage.getMediaBox())); |
| 20 | + |
| 21 | + public BaseTable(float yStart, float yStartNewPage, float pageTopMargin, float bottomMargin, float width, float margin, |
| 22 | + PDDocument document, PDPage currentPage, boolean drawLines, boolean drawContent) throws IOException { |
| 23 | + this(yStart, yStartNewPage, pageTopMargin, bottomMargin, width, margin, document, currentPage, drawLines, drawContent, newPageProvider(document, currentPage)); |
22 | 24 | }
|
23 |
| - |
24 |
| - public BaseTable(float yStart, float yStartNewPage, float pageTopMargin, float bottomMargin, float width, float margin, PDDocument document, PDPage currentPage, boolean drawLines, boolean drawContent, final PageProvider<PDPage> pageProvider) throws IOException { |
| 25 | + |
| 26 | + public BaseTable(float yStart, float yStartNewPage, float pageTopMargin, float bottomMargin, float width, float margin, |
| 27 | + PDDocument document, PDPage currentPage, boolean drawLines, boolean drawContent, PageProvider<PDPage> pageProvider) throws IOException { |
25 | 28 | super(yStart, yStartNewPage, pageTopMargin, bottomMargin, width, margin, document, currentPage, drawLines, drawContent, pageProvider);
|
26 | 29 | }
|
27 | 30 |
|
| 31 | + protected static DefaultPageProvider newPageProvider(final PDDocument doc, final PDPage page) { |
| 32 | + return new DefaultPageProvider(doc, page.getMediaBox(), page.getRotation()); |
| 33 | + } |
| 34 | + |
28 | 35 | @Override
|
29 | 36 | protected void loadFonts() {
|
30 | 37 | // Do nothing as we don't have any fonts to load
|
|
0 commit comments