forked from VahidN/iTextSharp.LGPLv2.Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddPageDictEntryTests.cs
More file actions
31 lines (26 loc) · 939 Bytes
/
AddPageDictEntryTests.cs
File metadata and controls
31 lines (26 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.IO;
using iTextSharp.text;
using iTextSharp.text.pdf;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace iTextSharp.LGPLv2.Core.FunctionalTests;
[TestClass]
public class AddPageDictEntryTests
{
[TestMethod]
public void Verify_Equivalent_Of_AddPageDictEntry_CanBeCreated()
{
var pdfFilePath = TestUtils.GetOutputFileName();
using (var fileStream = new FileStream(pdfFilePath, FileMode.Create))
{
using (var pdfDoc = new Document(PageSize.A6.Rotate()))
{
var pdfWriter = PdfWriter.GetInstance(pdfDoc, fileStream);
pdfDoc.AddAuthor(TestUtils.Author);
pdfDoc.Open();
pdfWriter.PageDictionary.Put(PdfName.Rotate, new PdfNumber(0));
pdfDoc.Add(new Chunk("Rotate a page and its content"));
}
}
TestUtils.VerifyPdfFileIsReadable(pdfFilePath);
}
}