add test
This commit is contained in:
parent
18c1fb482e
commit
8fa03497e9
@ -96,9 +96,12 @@ public class PdfSegmentationService {
|
||||
page.setRotation(rotation);
|
||||
page.setLandscape(isLandscape || isRotated);
|
||||
page.setPageNumber(pageNumber);
|
||||
List<PdfImage> imagelist = stripper.getImages();
|
||||
List<PdfImage> mergedList = processImages(imagelist);
|
||||
List<PdfImage> mergedList = processImages(stripper.getImages());
|
||||
page.setImages(mergedList);
|
||||
for (PdfImage image : mergedList) {
|
||||
image.getImage().flush();
|
||||
image.getImage().getGraphics().dispose();
|
||||
}
|
||||
|
||||
tableExtractionService.extractTables(cleanRulings, page);
|
||||
buildPageStatistics(page);
|
||||
@ -111,6 +114,7 @@ public class PdfSegmentationService {
|
||||
|
||||
pages.add(page);
|
||||
|
||||
|
||||
}
|
||||
|
||||
document.setPages(pages);
|
||||
|
||||
@ -484,7 +484,6 @@ public class RedactionIntegrationTest {
|
||||
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void noExceptionShouldBeThrownForAnyFiles() throws IOException {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
@ -68,6 +68,23 @@ public class PdfSegmentationServiceTest {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMergeImages() throws IOException {
|
||||
|
||||
ClassPathResource pdfFileResource = new ClassPathResource("files/Minimal Examples/270Rotated.pdf");
|
||||
|
||||
Document document = pdfSegmentationService.parseDocument(pdfFileResource.getInputStream());
|
||||
|
||||
}
|
||||
@Test
|
||||
public void testMergeImages2() throws IOException {
|
||||
|
||||
ClassPathResource pdfFileResource = new ClassPathResource("files/new/Single Study - Oral (Gavage) Mouse.pdf");
|
||||
|
||||
Document document = pdfSegmentationService.parseDocument(pdfFileResource.getInputStream());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testExtractImages() throws IOException {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user