ImagesToPdfDocumentConverter { public PDDocumentHandler addPage(Source<?> source) throws TaskException { return addPage(source, null, PageOrientation.AUTO, 0); } ImagesToPdfDocumentConverter(); PDDocumentHandler addPage(Source<?> source); PDDocumentHandler addPage(Source<?> source, PDRectangle pageSize, PageOrientation pageOrientation, 
                                     float marginInches); void beforeImage(Source<?> source); void afterImage(PDImageXObject image); void failedImage(Source<?> source, TaskIOException e); static void convertImageMergeInputToPdf(BaseMergeParameters<MergeInput> parameters,
            TaskExecutionContext context); static PDRectangle toPDRectangle(PageSize pageSize); PDDocumentHandler getDocumentHandler(); boolean isShouldReadRotationFromExif(); void setShouldReadRotationFromExif(boolean shouldReadRotationFromExif);  }
@Test public void imageWithExifRotation() throws TaskException { FileSource source = BaseTaskTest.customNonPdfInputAsFileSource("image/with_exif_orientation.JPG"); ImagesToPdfDocumentConverter converter = new ImagesToPdfDocumentConverter(); PDDocumentHandler d = converter.addPage(source); assertEquals(90, d.getPage(1).getRotation()); }