Exemplo n.º 1
0
        public void PhraseIsValid()
        {
            var font = new Content.Font(DynamoPDF.Content.Colors.Black, "HELVETICA", 12);

            DynamoPDF.Content.Phrase p = new Content.Phrase("Hello World", 0, font);
            var pdf = p.ToPDF();

            Assert.AreEqual("Hello World", pdf.Chunks[0].Content);
            Assert.AreEqual("HELVETICA", pdf.Chunks[0].Font.Familyname.ToUpper());
            Assert.AreEqual(12, pdf.Chunks[0].Font.Size);
        }
Exemplo n.º 2
0
        public void ListIsValid()
        {
            var font = new Content.Font(DynamoPDF.Content.Colors.Black, "HELVETICA", 12);

            DynamoPDF.Content.Phrase   p  = new Content.Phrase("Hello World", 0, font);
            DynamoPDF.Content.ListItem pg = new Content.ListItem(p);
            var list = new Content.List(true, false, new object[] { pg });
            var pdf  = pg.ToPDF();

            Assert.AreEqual("Hello World", pdf.Chunks[0].Chunks[0].Content);
            Assert.AreEqual("HELVETICA", pdf.Chunks[0].Chunks[0].Font.Familyname.ToUpper());
            Assert.AreEqual(12, pdf.Chunks[0].Chunks[0].Font.Size);
        }