Skip to content

Commit 6501108

Browse files
author
Kate Ivanova
committed
Add InheritedPageEntriesTest#setRotationToPageTest
DEVSIX-3834, DEVSIX-1704
1 parent 4767558 commit 6501108

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

kernel/src/test/java/com/itextpdf/kernel/pdf/InheritedPageEntriesTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ public void addNewPageToDocumentWithInheritedPageRotationTest() throws Interrupt
7070
Assert.assertNull(new CompareTool().compareByContent(outputFileName, cmpFileName, destinationFolder));
7171
}
7272

73+
@Test
74+
public void setRotationToPageTest() throws InterruptedException, IOException {
75+
String outputFileName = destinationFolder + "setRotationToPage.pdf";
76+
String cmpFileName = sourceFolder + "cmp_setRotationToPage.pdf";
77+
78+
PdfDocument pdfDoc = new PdfDocument(new PdfReader
79+
(sourceFolder + "srcFileTestRotationInheritance.pdf"), new PdfWriter(outputFileName));
80+
81+
PdfPage page = pdfDoc.getPage(1);
82+
page.setRotation(90);
83+
84+
pdfDoc.close();
85+
86+
Assert.assertNull(new CompareTool().compareByContent(outputFileName, cmpFileName, destinationFolder));
87+
}
88+
7389
@Test
7490
public void mediaBoxInheritance() throws IOException {
7591
String inputFileName = sourceFolder + "mediaBoxInheritanceTestSource.pdf";

0 commit comments

Comments
 (0)