perf: avoid re-rendering the first pdf page
This commit is contained in:
parent
1d243a0ca5
commit
d405b7a810
1 changed files with 3 additions and 1 deletions
|
@ -236,7 +236,9 @@ public class PdfUtils {
|
||||||
Graphics g = combined.getGraphics();
|
Graphics g = combined.getGraphics();
|
||||||
|
|
||||||
for (int i = 0; i < pageCount; ++i) {
|
for (int i = 0; i < pageCount; ++i) {
|
||||||
BufferedImage image = pdfRenderer.renderImageWithDPI(i, DPI, colorType);
|
if (i != 0) {
|
||||||
|
image = pdfRenderer.renderImageWithDPI(i, DPI, colorType);
|
||||||
|
}
|
||||||
g.drawImage(image, 0, i * image.getHeight(), null);
|
g.drawImage(image, 0, i * image.getHeight(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue