| 1 |
package org.sejda.impl.sambox.component.image; |
| 2 |
|
| 3 |
import org.junit.Test; |
| 4 |
import org.sejda.core.service.BaseTaskTest; |
| 5 |
import org.sejda.impl.sambox.component.PDDocumentHandler; |
| 6 |
import org.sejda.impl.sambox.util.PixelCompareUtils; |
| 7 |
import org.sejda.model.exception.TaskException; |
| 8 |
import org.sejda.model.input.FileSource; |
| 9 |
|
| 10 |
public class ImagesToPdfDocumentConverterTest { |
| 11 |
|
| 12 |
@Test |
| 13 |
public void imageWithExifRotation() throws TaskException { |
| 14 |
FileSource source = BaseTaskTest.customNonPdfInputAsFileSource("image/with_exif_orientation.JPG"); |
| 15 |
ImagesToPdfDocumentConverter converter = new ImagesToPdfDocumentConverter(); |
| 16 |
PDDocumentHandler d = converter.addPage(source); |
| 17 |
PixelCompareUtils.assertSimilar(d, "pdf/with_exif_orientation.pdf"); |
| 18 |
} |
| 19 |
} |