コード例 #1
0
        public void TestBreakTimes()
        {
            BreakLine br  = BreakLine.Times(3).Create();
            int       tot = TestUtils
                            .RegexCount(br.Content,
                                        "(<w:p wsp:rsidR=\"008979E8\" wsp:rsidRDefault=\"008979E8\"/>)");

            Assert.AreEqual(3, tot);
        }
コード例 #2
0
        public void TestBreakNumberConstructor02()
        {
            BreakLine br02 = new BreakLine(2);
            int tot = TestUtils
                .RegexCount(br02.Content,
                            "(<w:p wsp:rsidR=\"008979E8\" wsp:rsidRDefault=\"008979E8\"/>)");
            Assert.AreEqual(2, tot);

            BreakLine br04 = new BreakLine(4);
            //Assert.AreEqual(TestUtils.regexCount)
        }
コード例 #3
0
 public void TestBreakNumberConstructor()
 {
     BreakLine br = new BreakLine(1);
     Assert.AreEqual(
         "\n<w:p wsp:rsidR=\"008979E8\" wsp:rsidRDefault=\"008979E8\"/>",
         br.Content);
     int tot = TestUtils
         .RegexCount(br.Content,
                     "(<w:p wsp:rsidR=\"008979E8\" wsp:rsidRDefault=\"008979E8\"/>)");
     Assert.AreEqual(1, tot);
 }
コード例 #4
0
        public void TestBreakNumberConstructor02()
        {
            BreakLine br02 = new BreakLine(2);
            int       tot  = TestUtils
                             .RegexCount(br02.Content,
                                         "(<w:p wsp:rsidR=\"008979E8\" wsp:rsidRDefault=\"008979E8\"/>)");

            Assert.AreEqual(2, tot);

            BreakLine br04 = new BreakLine(4);
            //Assert.AreEqual(TestUtils.regexCount)
        }
コード例 #5
0
        /// <summary>
        /// Singleton instance
        /// </summary>
        public static BreakLineOsnapOverrule Instance()
        {
            if (_breakLineOsnapOverrule != null)
            {
                return(_breakLineOsnapOverrule);
            }

            _breakLineOsnapOverrule = new BreakLineOsnapOverrule();

            // Фильтр "отлова" примитива по расширенным данным. Работает лучше, чем проверка вручную!
            _breakLineOsnapOverrule.SetXDataFilter(BreakLine.GetDescriptor().Name);
            return(_breakLineOsnapOverrule);
        }
コード例 #6
0
        public void TestBreakDefaultTest()
        {
            BreakLine br = new BreakLine();

            Assert.AreEqual(
                "\n<w:p wsp:rsidR=\"008979E8\" wsp:rsidRDefault=\"008979E8\"/>",
                br.Content);
            int tot = TestUtils
                      .RegexCount(br.Content,
                                  "(<w:p wsp:rsidR=\"008979E8\" wsp:rsidRDefault=\"008979E8\"/>)");

            Assert.AreEqual(1, tot);
        }
コード例 #7
0
        public void PrintBoards(int idx)
        {
            // dodanie rozkladu
            Table rozklad = PrintBoardRozklad(game.boards[idx].rozklad, idx + 1, game.boards[idx].vulnerability);

            rozklad.Rows.LeftIndent = "1.5cm";

            document.LastSection.Add(rozklad);

            // document.LastSection.LastTable.Format.Alignment = ParagraphAlignment.Center;
            document.LastSection.Add(BreakLine.Clone());

            // dodanie DF
            int[,] analizaDF = BridgeInfo.wylicz_DF(ref game.boards[idx].rozklad);

            if (idx == 4)
            {
                rozklad.Rows.LeftIndent = "1.5cm";
            }

            Contract minimax = BridgeInfo.FindOptimalContract(analizaDF, game.boards[idx].vulnerability,
                                                              game.boards[idx].rozklad.dealer);

            Paragraph p = new Paragraph();

            p.AddFormattedText(napisDF, Czcionki.font_header);
            document.LastSection.Add(p);
            document.LastSection.Add(BreakLine.Clone());
            document.LastSection.Add(WriteDeepFinesse(analizaDF));

            document.LastSection.Add(WriteMinimax(minimax));

            // dodanie licytacji
            p = new Paragraph();
            p.AddFormattedText(napisLicytacja, Czcionki.font_header);
            document.LastSection.Add(BreakLine.Clone());
            document.LastSection.Add(p);
            document.LastSection.Add(BreakLine.Clone());
            Table biddingtrening = PrintBiddingTable(game.boards[idx].bidding, game.boards[idx].rozklad.dealer,
                                                     game.boards[idx].players);
            Paragraph p_tmp = new Paragraph();

            p_tmp.AddLineBreak();


            document.LastSection.Add(PrintConsolationBidding(idx));
            document.LastSection.Add(BreakLine.Clone());
            // linie z komentarzami
            document.LastSection.Add(AddCommentLines());
        }
コード例 #8
0
        /// <summary>
        /// Панель "Линии"
        /// </summary>
        private static void AddLinesPanel(RibbonTab ribbonTab)
        {
            // create the panel source
            var ribSourcePanel = new RibbonPanelSource {
                Title = Language.GetItem("tab1")
            };

            // now the panel
            var ribPanel = new RibbonPanel {
                Source = ribSourcePanel
            };

            ribbonTab.Panels.Add(ribPanel);

            var ribRowPanel = new RibbonRowPanel();

            // mpBreakLine
            ribRowPanel.Items.Add(GetBigSplitButton(BreakLine.GetDescriptor()));

            // mpWeldJoint
            ribRowPanel.Items.Add(GetBigSplitButton(WeldJoint.GetDescriptor()));

            if (ribRowPanel.Items.Any())
            {
                ribSourcePanel.Items.Add(ribRowPanel);
            }

            ribRowPanel = new RibbonRowPanel();

            // mpGroundLine
            ribRowPanel.Items.Add(GetSmallSplitButton(GroundLine.GetDescriptor()));

            ribRowPanel.Items.Add(new RibbonRowBreak());

            // mpWaterProofing
            ribRowPanel.Items.Add(GetSmallSplitButton(WaterProofing.GetDescriptor()));

            if (ribRowPanel.Items.Any())
            {
                ribSourcePanel.Items.Add(ribRowPanel);
            }
        }
コード例 #9
0
        /// <inheritdoc />
        public override void OnGripStatusChanged(ObjectId entityId, Status newStatus)
        {
            try
            {
                // При начале перемещения запоминаем первоначальное положение ручки
                // Запоминаем начальные значения
                if (newStatus == Status.GripStart)
                {
                    if (GripName == GripName.StartGrip)
                    {
                        _startGripTmp = GripPoint;
                    }

                    if (GripName == GripName.EndGrip)
                    {
                        _endGripTmp = GripPoint;
                    }

                    if (GripName == GripName.MiddleGrip)
                    {
                        _startGripTmp = BreakLine.InsertionPoint;
                        _endGripTmp   = BreakLine.EndPoint;
                    }
                }

                // При удачном перемещении ручки записываем новые значения в расширенные данные
                // По этим данным я потом получаю экземпляр класса BreakLine
                if (newStatus == Status.GripEnd)
                {
                    using (var tr = AcadUtils.Database.TransactionManager.StartOpenCloseTransaction())
                    {
                        var blkRef = tr.GetObject(BreakLine.BlockId, OpenMode.ForWrite, true, true);
                        using (var resBuf = BreakLine.GetDataForXData())
                        {
                            blkRef.XData = resBuf;
                        }

                        tr.Commit();
                    }

                    BreakLine.Dispose();
                }

                // При отмене перемещения возвращаем временные значения
                if (newStatus == Status.GripAbort)
                {
                    if (_startGripTmp != null & GripName == GripName.StartGrip)
                    {
                        BreakLine.InsertionPoint = GripPoint;
                    }

                    if (GripName == GripName.MiddleGrip & _startGripTmp != null & _endGripTmp != null)
                    {
                        BreakLine.InsertionPoint = _startGripTmp;
                        BreakLine.EndPoint       = _endGripTmp;
                    }

                    if (_endGripTmp != null & GripName == GripName.EndGrip)
                    {
                        BreakLine.EndPoint = GripPoint;
                    }
                }

                base.OnGripStatusChanged(entityId, newStatus);
            }
            catch (Exception exception)
            {
                ExceptionBox.Show(exception);
            }
        }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BreakLineGrip"/> class.
 /// </summary>
 /// <param name="breakLine">Экземпляр класса <see cref="mpBreakLine.BreakLine"/>, связанный с этой ручкой</param>
 /// <param name="gripName">Имя ручки</param>
 public BreakLineGrip(BreakLine breakLine, GripName gripName)
 {
     BreakLine = breakLine;
     GripName  = gripName;
     GripType  = GripType.Point;
 }
コード例 #11
0
 /// <inheritdoc />
 public override bool IsApplicable(RXObject overruledSubject)
 {
     return(ExtendedDataUtils.IsApplicable(overruledSubject, BreakLine.GetDescriptor().Name));
 }
コード例 #12
0
ファイル: main.cs プロジェクト: staherianYMCA/test
        static void Main(string[] args)
        {
            IDocument myDoc = new Document2004();

            Properties prop = new Properties
            {
                //AppName = "Sharp2Word",
                Author    = "Dublicator",
                LastSaved = DateTime.Now
            };

            myDoc.Head.Properties = prop;

            myDoc.AddEle(BreakLine.SetTimes(1).Create());             // this is one breakline

            //Headings
            myDoc.AddEle(Heading2.With("===== Headings ======").Create());
            myDoc.AddEle(
                Paragraph.With(
                    "This doc has been generated by Sharp2Word.")
                .Create());
            myDoc.AddEle(BreakLine.SetTimes(1).Create());

            myDoc.AddEle(Paragraph
                         .With("I will try to use a little bit of everything in the API Sharp2word. " +
                               "I realised that is very dificult to keep the documentation updated " +
                               "so this is where I will demostrate how to do some cool things with Sharp2Word!")
                         .Create());


            myDoc.AddEle(Heading1.With("Heading01 without styling").Create());
            myDoc.AddEle(Heading2.With("Heading02 with styling").WithStyle()
                         .Align(Align.CENTER).Italic().Create());
            myDoc.AddEle(Heading3.With("Heading03").WithStyle().Bold()
                         .Align(Align.RIGHT).Create());

            //Paragraph and ParagrapPiece
            myDoc.AddEle(Heading2.With("===== Paragraph and ParagrapPiece ======").Create());
            myDoc.AddEle(Paragraph.With("I am a very simple paragraph.").Create());

            myDoc.AddEle(BreakLine.SetTimes(1).Create());
            ParagraphPiece myParPiece01 =
                ParagraphPiece.With(
                    "If you use the class 'Paragraph', you will have limited style. Maybe only paragraph aligment.");
            ParagraphPiece myParPiece02 =
                ParagraphPiece.With("In order to use more advanced style, you have to use ParagraphPiece");
            ParagraphPiece myParPiece03 =
                ParagraphPiece.With(
                    "One example of this is when you want to make ONLY one word BOLD or ITALIC. the way to to this is create many pieces, format them separetely and put all together in a Paragraph object. Example:");

            myDoc.AddEle(Paragraph.WithPieces(myParPiece01, myParPiece02, myParPiece03).Create());

            ParagraphPiece myParPieceJava  = ParagraphPiece.With("I like C# and ").WithStyle().Font(Font.COURIER).Create();
            ParagraphPiece myParPieceRuby  = ParagraphPiece.With("Ruby!!! ").WithStyle().Bold.Italic.Create();
            ParagraphPiece myParPieceAgile =
                ParagraphPiece.With("I actually love C#, TDD, patterns... ").WithStyle().
                TextColor("008000").Create();

            myDoc.AddEle(Paragraph.WithPieces(myParPieceJava, myParPieceRuby, myParPieceAgile).Create());

            //font size
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("No size").Create(),
                                              ParagraphPiece.With("I am size 50.").WithStyle().FontSize(50).TextColor(System.Drawing.Color.Cyan).Create()));

            //Document Header and Footer
            myDoc.AddEle(BreakLine.SetTimes(2).Create());
            myDoc.AddEle(Heading2.With("===== Document Header and Footer ======").Create());
            myDoc.AddEle(Paragraph.With("By default everything is added to the Body when you do 'myDoc.AddEle(...)'." +
                                        " But you can add elements to the Header and/or Footer. Other cool thing is show page number or not.")
                         .Create());

            myDoc.AddEle(BreakLine.SetTimes(2).Create());
            myDoc.AddEle(
                Paragraph.With(
                    "Page number is displayed by default but you can disable: 'myDoc.getFooter().showPageNumber(false)' ")
                .Create());

            myDoc.AddEle(BreakLine.SetTimes(2).Create());
            myDoc.AddEle(
                Paragraph.With(
                    "you can also hide Header and Footer in the first Page. This is useful for when you have a cover page.: 'myDoc.getHeader().SetHideHeaderAndFooterFirstPage(true)' ")
                .Create());

            myDoc.Header.AddEle(
                Paragraph.WithPieces(ParagraphPiece.With("I am in the"),
                                     ParagraphPiece.With(" Header ").WithStyle().Bold.Create(),
                                     ParagraphPiece.With("of all pages")).Create());

            myDoc.Footer.AddEle(Paragraph.With("I am in the Footer of all pages").Create());


            //Images
            myDoc.AddEle(BreakLine.SetTimes(1).Create());
            myDoc.AddEle(Heading2.With("===== Images ======").Create());
            myDoc.AddEle(
                Paragraph.With(
                    "Images can be created from diferent locations. It can be from your local machine, from web URL or classpath.")
                .Create());

            myDoc.AddEle(Paragraph.With("This one is coming from WEB, google web site: ").Create());
            //myDoc.AddEle(Image.From_WEB_URL("http://www.google.com/images/logos/ps_logo2.png"));

            myDoc.AddEle(BreakLine.SetTimes(2).Create());
            myDoc.AddEle(Paragraph.With("You can change the image dimensions:.").Create());
            //myDoc.AddEle(
            //			Image.From_WEB_URL("http://www.google.com/images/logos/ps_logo2.png").SetHeight(40).SetWidth(80).
            //			Create());


            myDoc.AddEle(BreakLine.SetTimes(2).Create());
            myDoc.AddEle(
                Paragraph.With(
                    "You can always be creative mixing up images inside other IElements. Eg.: Paragraphs, Tables, etc.")
                .Create());

            myDoc.AddEle(BreakLine.SetTimes(1).Create());


            //Table
            myDoc.AddEle(Heading2.With("===== Table ======").Create());
            myDoc.AddEle(
                Paragraph.With("Table os soccer playerd and their number of gols - the best of the best of all times:").
                Create());
            myDoc.AddEle(BreakLine.SetTimes(1).Create());

            Table tbl = new Table();

            tbl.AddTableEle(TableEle.TH, "Name", "Number of gols", "Country");

            tbl.AddTableEle(TableEle.TD, "Arthur Friedenreich", "1329", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Pele", "1281", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Romario", "1002", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Tulio Maravilha", "956", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Zico", "815", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Roberto Dinamite", "748", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Di Stéfano", "715", "Argentina");
            tbl.AddTableEle(TableEle.TD, "Puskas", "689", "Hungary");
            tbl.AddTableEle(TableEle.TD, "Flávio", "591", "Brazil");
            tbl.AddTableEle(TableEle.TD, "James McGory", "550", "Scotland");
            tbl.AddTableEle(TableEle.TD, "Leonardo Correa", "299", "Brazil/Australia");

            tbl.AddTableEle(TableEle.TF, "Total", "1,100,000.00", " ");

            myDoc.AddEle(tbl);

            myDoc.AddEle(BreakLine.SetTimes(1).Create());

            myDoc.AddEle(
                Paragraph.WithPieces(
                    ParagraphPiece.With("* Zico was mid-fieldfer and managed to score all those f*****g goals!").
                    WithStyle().Italic.Create()).Create());
            myDoc.AddEle(
                Paragraph.WithPieces(
                    ParagraphPiece.With(
                        "* Leonardo Correa's goals (me) include futsal, soccer, friendly games, training games, so on... (but not playstation)")
                    .WithStyle().Italic.Create()).Create());


            //PageBreaks
            myDoc.AddEle(Heading2.With("===== PageBreak ======").Create());
            myDoc.AddEle(Paragraph.With("There is a PAGE BREAK after this line:").Create());
            myDoc.AddEle(PageBreak.Create());
            myDoc.AddEle(Paragraph.With("There is a PAGE BREAK before this line:").Create());

            myDoc.Save("mytest.doc");
        }
コード例 #13
0
ファイル: Program.cs プロジェクト: brostalker/sharp2word
        static void Main()
        {
            IDocument myDoc = new Document2004();

            myDoc.Body.SetMarginBody(10, 10, 10, 10);
            // myDoc.setPageOrientationLandscape();// default is Portrait be can be
            // changed.

            // Headings
            myDoc.AddEle(Heading2.With("===== Headings ======").Create());
            myDoc.AddEle(Paragraph
                         .With("This doc has been generated by the unit test testJava2wordAllInOne() in the class DocumentTest2004Test.java.")
                         .Create());
            myDoc.AddEle(BreakLine.Times(1).Create());

            myDoc.AddEle(Paragraph
                         .With("I will try to use a little bit of everything in the API Java2word. "
                               + "I realised that is very dificult to keep the doucmentation updated "
                               + "so this is where I will demostrate how to do some cool things With Java2word!")
                         .Create());

            myDoc.AddEle(Heading1.With("Heading01 without styling").Create());
            myDoc.AddEle(Heading2.With("Heading02 With styling").WithStyle()
                         .Align(Align.CENTER).Italic().Create());
            myDoc.AddEle(Heading3.With("Heading03").WithStyle().Bold()
                         .Align(Align.RIGHT).Create());

            // Paragraph and ParagrapPiece
            myDoc.AddEle(Heading2.With("===== Paragraph and ParagrapPiece ======")
                         .Create());
            myDoc.AddEle(Paragraph.With("I am a very simple paragraph.").Create());

            myDoc.AddEle(BreakLine.Times(1).Create());
            ParagraphPiece myParPiece01 = ParagraphPiece
                                          .With("If you use the class 'Paragraph', you will have limited style. Maybe only paragraph aligment.");
            ParagraphPiece myParPiece02 = ParagraphPiece
                                          .With("In order to use more advanced style, you have to use ParagraphPiece");
            ParagraphPiece myParPiece03 = ParagraphPiece
                                          .With("One example of this is when you want to make ONLY one word BOLD or ITALIC. the way to to this is Create many pieces, format them separetely and put all together in a Paragraph object. Example:");

            myDoc.AddEle(Paragraph.WithPieces(myParPiece01, myParPiece02,
                                              myParPiece03).Create());

            ParagraphPiece myParPieceJava = ParagraphPiece.With("I like Java and ")
                                            .WithStyle().Font(WordFont.COURIER).Create();
            ParagraphPiece myParPieceRuby = ParagraphPiece.With("Ruby!!! ")
                                            .WithStyle().Bold().Italic().Create();
            ParagraphPiece myParPieceAgile = ParagraphPiece
                                             .With("I actually love Java, Ruby Agile, BDD, Cucumber, automation... ")
                                             .WithStyle().TextColor("008000").Create();

            myDoc.AddEle(Paragraph.WithPieces(myParPieceJava, myParPieceRuby,
                                              myParPieceAgile).Create());

            myDoc.AddEle(BreakLine.Times(2).Create());
            myDoc.AddEle(Paragraph.WithPieces(
                             ParagraphPiece.With("This is a manual 'Bold' and 'Italic'")
                             .WithStyle().Font(WordFont.COURIER).Bold().Italic()
                             .Create()).Create());
            myDoc.AddEle(Paragraph
                         .WithPieces(
                             ParagraphPiece
                             .With("This is the SAME as the above line but With 'Smart' Bold/Align ")
                             .WithStyle().Font(WordFont.COURIER_BOLD_ITALIC)
                             .Create()).Create());
            myDoc.AddEle(BreakLine.Times(1).Create());

            // Font size
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("No size")
                                              .Create(), ParagraphPiece.With("I am size 24.").WithStyle()
                                              .FontSize(24).Create()));

            //ParagraphPiece and other format/styles
            myDoc.AddEle(BreakLine.Times(1).Create());
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("New ParagraphPiece styles have been implemented. Here they are:").WithStyle().FontSize(14).Create()));

            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("Subscript").WithStyle().Subscript().Create()));
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("Superscript").WithStyle().Superscript().Create()));
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("Strike").WithStyle().Strike().Create()));
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("Caps").WithStyle().Caps().Create()));
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("SmallCaps").WithStyle().SmallCaps().Create()));
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("DoubleStrike").WithStyle().DoubleStrike().Create()));
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("Emboss").WithStyle().Emboss().Create()));
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("Imprint").WithStyle().Imprint().Create()));
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("Outline").WithStyle().Outline().Create()));
            myDoc.AddEle(Paragraph.WithPieces(ParagraphPiece.With("The Style is: ").Create(), ParagraphPiece.With("Shadow").WithStyle().Shadow().Create()));
            myDoc.AddEle(BreakLine.Times(2).Create());


            // Document Header and Footer
            myDoc.AddEle(BreakLine.Times(2).Create());
            myDoc.AddEle(Heading2.With("===== Document Header and Footer ======")
                         .Create());
            myDoc.AddEle(Paragraph
                         .With("By default everything is added to the Body when you do 'myDoc.AddEle(...)'."
                               + " But you can add elements to the Header and/or Footer. Other cool thing is show page number or not.")
                         .Create());

            myDoc.AddEle(BreakLine.Times(2).Create());
            myDoc.AddEle(Paragraph
                         .With("Page number is displayed by default but you can disable: 'myDoc.Footer().showPageNumber(false)' ")
                         .Create());

            myDoc.AddEle(BreakLine.Times(2).Create());
            myDoc.AddEle(Paragraph
                         .With("you can also hide Header and Footer in the first Page. This is useful for when you have a cover page.: 'myDoc.Header.setHideHeaderAndFooterFirstPage(true)' ")
                         .Create());

            myDoc.Header.AddEle(
                Paragraph.WithPieces(
                    ParagraphPiece.With("I am in the"),
                    ParagraphPiece.With(" Header ").WithStyle().Bold()
                    .Create(), ParagraphPiece.With("of all pages"))
                .Create());

            myDoc.Footer.AddEle(
                Paragraph.With("I am in the Footer of all pages").Create());

            // Images
            myDoc.AddEle(BreakLine.Times(1).Create());
            myDoc.AddEle(Heading2.With("===== Images ======").Create());
            myDoc.AddEle(Paragraph
                         .With("Images can be created from diferent locations. It can be from your local machine, from web URL or classpath.")
                         .Create());

            myDoc.AddEle(Paragraph.With(
                             "This one is coming from WEB, google web site: ").Create());
            myDoc.AddEle(Image.FromUrl("http://www.google.com/images/logos/ps_logo2.png"));

            myDoc.AddEle(BreakLine.Times(2).Create());
            myDoc.AddEle(Paragraph.With("You can change the image dimensions:.")
                         .Create());
            myDoc.AddEle(Image
                         .FromUrl("http://www.google.com/images/logos/ps_logo2.png")
                         .SetHeight(40).SetWidth(80).Create());

            myDoc.AddEle(BreakLine.Times(2).Create());
            myDoc.AddEle(Paragraph
                         .With("You can always be creative mixing up images inside other IElements. Eg.: Paragraphs, Tables, etc.")
                         .Create());

            /*myDoc.AddEle(Paragraph
             *      .With("This document inside the paragraph, coming from '/src/test/resources/dtpick.gif': "
             + Image.From_FULL_LOCAL_PATHL(
             +                      Util.AppRoot
             + "/src/test/resources/dtpick.gif")
             +                      .Content));*/

            myDoc.AddEle(BreakLine.Times(1).Create());

            // Table
            myDoc.AddEle(Heading2.With("===== Table ======").Create());
            myDoc.AddEle(Paragraph
                         .With("Table os soccer playerd and their number of gols - the best of the best of all Times:")
                         .Create());
            myDoc.AddEle(BreakLine.Times(1).Create());

            Table tbl = new Table();

            tbl.AddTableEle(TableEle.TH, "Name", "Number of gols", "Country");
            tbl.SetRepeatTableHeaderOnEveryPage();

            tbl.AddTableEle(TableEle.TD, "Arthur Friedenreich", "1329", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Pele", "1281", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Romario", "1002", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Tulio Maravilha", "956", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Zico", "815", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Roberto Dinamite", "748", "Brazil");
            tbl.AddTableEle(TableEle.TD, "Di Stéfano", "715", "Argentina");
            tbl.AddTableEle(TableEle.TD, "Puskas", "689", "Hungary");
            tbl.AddTableEle(TableEle.TD, "Flávio", "591", "Brazil");
            tbl.AddTableEle(TableEle.TD, "James McGory", "550", "Scotland");
            tbl.AddTableEle(TableEle.TD, "Leonardo Correa", "299",
                            "Brazil/Australia");

            tbl.AddTableEle(TableEle.TF, "Total", "1,100,000.00", " ");

            myDoc.AddEle(tbl);

            myDoc.AddEle(BreakLine.Times(1).Create());

            myDoc.AddEle(Paragraph
                         .WithPieces(
                             ParagraphPiece
                             .With("* Zico was mid-fieldfer and managed to score all those f*****g goals!")
                             .WithStyle().Italic().Create()).Create());
            myDoc.AddEle(Paragraph
                         .WithPieces(
                             ParagraphPiece
                             .With("* Leonardo Correa's goals (me) include futsal, soccer, friendly games, training games, so on... (but not playstation)")
                             .WithStyle().Italic().Create()).Create());

            // PageBreaks
            myDoc.AddEle(Heading2.With("===== PageBreak ======").Create());
            myDoc.AddEle(Paragraph.With("There is a PAGE BREAK after this line:")
                         .Create());
            myDoc.AddEle(PageBreak.Create());
            myDoc.AddEle(Paragraph.With("There is a PAGE BREAK before this line:")
                         .Create());

            myDoc.Save(@"c:\mytest.doc");
        }