Esempio n. 1
0
//    [UnitTestFunction]
        public static void TestHyperlink()
        {
            Document doc = new Document();

            doc.Info.Author = "K.P.";
            Section   sec = doc.Sections.AddSection();
            Paragraph par = sec.AddParagraph();

            par.AddBookmark("myBookmark1");
            Hyperlink hp = par.AddHyperlink("myBookmark1");

            hp.AddText("Hyperlink lokal");

            hp = par.AddHyperlink("http://www.empira.de", HyperlinkType.Web);
            hp.AddText("Hyperlink Web");

            hp = par.AddHyperlink("RtfHyperlinks.txt", HyperlinkType.File);
            hp.AddText("Hyperlink Datei Relativ");

            hp = par.AddHyperlink(@"\\Klpo01\D$\Kram\Tabs.pdf", HyperlinkType.File);
            hp.AddText("Hyperlink Datei Netzwerk");

            DocumentRenderer docRndrr = new DocumentRenderer();

            docRndrr.Render(doc, "RtfHyperlinks.txt", null);

            File.Copy("RtfHyperlinks.txt", "RtfHyperlinks.rtf", true);
            System.Diagnostics.Process.Start("RtfHyperlinks.txt");
        }
Esempio n. 2
0
        public static void DefineTableOfContents(Document document)
        {
            Section section = document.LastSection;

            section.AddPageBreak();
            Paragraph paragraph = section.AddParagraph("Table of Contents");

            paragraph.Format.Font.Size    = 14;
            paragraph.Format.Font.Bold    = true;
            paragraph.Format.SpaceAfter   = 24;
            paragraph.Format.OutlineLevel = OutlineLevel.Level1;

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            Hyperlink hyperlink = paragraph.AddHyperlink("Paragraphs");

            hyperlink.AddText("Paragraphs\t");
            hyperlink.AddPageRefField("Paragraphs");

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            hyperlink       = paragraph.AddHyperlink("Tables");
            hyperlink.AddText("Tables\t");
            hyperlink.AddPageRefField("Tables");

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            hyperlink       = paragraph.AddHyperlink("Charts");
            hyperlink.AddText("Charts\t");
            hyperlink.AddPageRefField("Charts");
        }
Esempio n. 3
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="result">LearnResult - learning result</param>
        /// <param name="chartFilename">string - char filename</param>
        /// <param name="includeDataTable">bool - true id learning data should be included</param>
        public HistoryPDF(LearnByErrorLibrary.LearnResult result, String chartFilename, bool includeDataTable = false)
        {
            this.result        = result;
            this.chartFilename = chartFilename;

            document               = new Document();
            document.Info.Title    = "NBN C# - wynik uczenia sieci neuronowej";
            document.Info.Subject  = "Uczenie sieci neuronowej za pomocą algorytmu NBN C#";
            document.Info.Author   = "Marek Bar 33808";
            document.Info.Comment  = "...ponieważ tylko dobry kod się liczy.";
            document.Info.Keywords = "C#, NBN, neuron, uczenie, sieć, nbn c#";

            DefineStyles(document);
            DefineCover(document);
            DefineInfo(document, result);
            DefineChartArea(document, chartFilename, Path.GetFileNameWithoutExtension(result.Filename));
            DefineWeightsSection(document, result);

            if (includeDataTable)
            {
                MatrixMB mat = MatrixMB.Load(result.Filename);
                AddMatrixTable(document, mat);
            }

            Section section = document.LastSection;

            section.AddPageBreak();//index of pages
            Paragraph paragraph = section.AddParagraph("Spis treści");

            paragraph.Format.Font.Size    = 14;
            paragraph.Format.Font.Bold    = true;
            paragraph.Format.SpaceAfter   = 24;
            paragraph.Format.OutlineLevel = OutlineLevel.Level1;

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";

            //first link
            Hyperlink hyperlink = paragraph.AddHyperlink("Informacje na temat sieci neuronowej");

            hyperlink.AddText("\r\n" + "Informacje na temat sieci neuronowej" + "\t");
            hyperlink.AddPageRefField("Informacje na temat sieci neuronowej");

            hyperlink = paragraph.AddHyperlink("Wykres przebiegu uczenia");
            hyperlink.AddText("\r\n" + "Wykres przebiegu uczenia" + "\t");
            hyperlink.AddPageRefField("Wykres przebiegu uczenia");

            hyperlink = paragraph.AddHyperlink("Wagi otrzymane w procesie uczenia");
            hyperlink.AddText("\r\n" + "Wagi otrzymane w procesie uczenia" + "\t");
            hyperlink.AddPageRefField("Wagi otrzymane w procesie uczenia");
            if (includeDataTable)
            {
                hyperlink = paragraph.AddHyperlink("Dane wejściowe");
                hyperlink.AddText("\r\n" + "Dane wejściowe" + "\t");
                hyperlink.AddPageRefField("Dane wejściowe");
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Builds a table of contents, based on the content
        /// </summary>
        /// <param name="doc">The document to define for</param>
        /// <param name="contents">The content</param>
        private void DefineTableOfContents(Document doc, IEnumerable <FaseType> contents)
        {
            Section sect = doc.LastSection;

            sect.AddPageBreak();
            Paragraph p = sect.AddParagraph("Inhoudsopgave", "Heading1");

            p.Format.SpaceAfter   = 24;
            p.Format.OutlineLevel = OutlineLevel.Level1;

            foreach (FaseType ft in contents)
            {
                Paragraph p2 = sect.AddParagraph();
                p2.Style = "TOC";

                if (ft.Type != null)
                {
                    Hyperlink hyperlink = p2.AddHyperlink(ft.Type);
                    hyperlink.AddText(ft.Type + "\t");
                    hyperlink.AddPageRefField(ft.Type);
                }
                else
                {
                    p2.AddFormattedText("Critical data incomplete", "error");
                }
            }
        }
        /// <summary>
        /// Builds a table of contents, based on the content
        /// </summary>
        /// <param name="doc">The document to define for</param>
        /// <param name="contents">The content</param>
        private void DefineTableOfContents(Document doc, IEnumerable <Module> contents)
        {
            Section sect = doc.LastSection;

            sect.AddPageBreak();
            Paragraph p = sect.AddParagraph("Inhoudsopgave", "Heading1");

            p.Format.SpaceAfter   = 24;
            p.Format.OutlineLevel = OutlineLevel.Level1;

            foreach (Module m in contents)
            {
                Paragraph p2 = sect.AddParagraph();
                p2.Style = "TOC";
                if (m.Naam != null && m.Schooljaar != null)
                {
                    Hyperlink hyperlink = p2.AddHyperlink(m.Naam + " - " + m.Schooljaar);
                    hyperlink.AddText(m.Naam + "\t");
                    hyperlink.AddPageRefField(m.Naam + " - " + m.Schooljaar);
                }
                else
                {
                    p2.AddFormattedText("Critical data incomplete", "error");
                }
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Renders the element.
        /// </summary>
        /// <param name="pdfStyling">The PDF styling.</param>
        /// <param name="section">The section.</param>
        public void Render(IPdfStyling pdfStyling, Section section)
        {
            Paragraph paragraph = section.AddParagraph();

            Hyperlink hyperlink = paragraph.AddHyperlink(this._text, this._hyperlinkType);

            hyperlink.AddText(this._text);
        }
        private void OrderForm_addBesked()
        {
            //Dim paragraph As Paragraph
            Section LastSec = this.document.LastSection;

            var with_1 = LastSec.AddParagraph(); //paragraph

            with_1.Format.SpaceBefore = "5mm";
            //.Format.Font.Size = 7
            with_1.AddText("Såfremt der er spørgsmål til denne følgeseddel er I meget velkommen til at kontakte os på ");


            string KontaktEmail = ConfigurationManager.AppSettings["invoice.email"];
            string KontaktPhone = ConfigurationManager.AppSettings["invoice.phone"];

            Hyperlink hyp = with_1.AddHyperlink("mailto:" + KontaktEmail, HyperlinkType.Web);

            hyp.AddText(KontaktEmail);
            with_1.AddText(" eller på telefon nr. ");
            with_1.AddText(KontaktPhone);
            with_1.AddLineBreak();

            Font FontTal = new Font();

            FontTal.Color = new Color((byte)255, (byte)0, (byte)0);
            FontTal.Bold  = true;
            var with_3 = LastSec.AddParagraph(); //paragraph

            with_3.Format.SpaceBefore = "5mm";
            //.Format.Font.Size = 7
            with_3.Format.Alignment = ParagraphAlignment.Center;
            with_3.AddText("Med venlig hilsen");
            with_3.AddLineBreak();
            var with_4 = LastSec.AddParagraph(); //paragraph

            with_4.Format.Alignment = ParagraphAlignment.Center;
            with_4.AddText(Company.name);
            with_4.AddLineBreak();

            //With LastSec.AddParagraph  'paragraph
            //    .Format.SpaceBefore = "0,5cm"
            //    '.Format.Font.Size = 7
            //    .Format.Alignment = ParagraphAlignment.Center

            //    ' Put a signatur image
            //    If SignaturImage <> "" AndAlso SignaturImage <> "signatur.gif" Then
            //        With .AddImage(SignaturImage)
            //            .LockAspectRatio = True
            //            .Width = "3,05cm"
            //            .WrapFormat.Style = WrapStyle.None
            //        End With
            //    End If
            //    .AddLineBreak()
            //    .AddText(Signatur)
            //    .AddLineBreak()
            //End With
        }
Esempio n. 8
0
        private void DefineTableOfContentsProvinces(Document document)
        {
            Section section = document.LastSection;

            section.AddPageBreak();
            Paragraph paragraph = section.AddParagraph("Table of Contents");

            paragraph.Format.Font.Size    = 14;
            paragraph.Format.Font.Bold    = true;
            paragraph.Format.SpaceAfter   = 24;
            paragraph.Format.OutlineLevel = OutlineLevel.Level1;

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            Hyperlink hyperlink = paragraph.AddHyperlink("All Provinces");

            hyperlink.AddText("All Provinces\t");
            hyperlink.AddPageRefField("All Provinces");

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            hyperlink       = paragraph.AddHyperlink("Provinces");
            hyperlink.AddText("Provinces\t");
            hyperlink.AddPageRefField("Provinces");

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            hyperlink       = paragraph.AddHyperlink("Province");
            hyperlink.AddText("Province\t");
            hyperlink.AddPageRefField("Province");

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            hyperlink       = paragraph.AddHyperlink("Male Players");
            hyperlink.AddText("Male Players\t");
            hyperlink.AddPageRefField("Male Players");

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            hyperlink       = paragraph.AddHyperlink("Female Players");
            hyperlink.AddText("Female Players\t");
            hyperlink.AddPageRefField("Female Players");

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            hyperlink       = paragraph.AddHyperlink("Events");
            hyperlink.AddText("Events\t");
            hyperlink.AddPageRefField("Events");

            paragraph       = section.AddParagraph();
            paragraph.Style = "TOC";
            hyperlink       = paragraph.AddHyperlink("Charts");
            hyperlink.AddText("Charts\t");
            hyperlink.AddPageRefField("Charts");
        }
Esempio n. 9
0
        public void TestGetHyperlinkTextElements()
        {
            string    linkName      = "hyperlinkName";
            string    linkText      = "link text";
            string    linkFormatted = "link formatted text";
            Paragraph paragraph     = document.LastSection.AddParagraph();
            Hyperlink link          = paragraph.AddHyperlink(linkName);

            link.AddText(linkText);
            link.AddFormattedText(linkFormatted);
            List <string> textElements = paragraph.Elements.GetTextElements().ToList();

            Assert.AreEqual(2, textElements.Count);
            Assert.AreEqual(linkText, textElements[0]);
            Assert.AreEqual(linkFormatted, textElements[1]);
        }
Esempio n. 10
0
        public static void DefineTableOfContents(FinalDocument model)
        {
            if (!model.TOC)
            {
                return;
            }
            Section section = model.Document.AddSection();

            section.PageSetup.LeftMargin  = 40;
            section.PageSetup.RightMargin = 40;
            section.AddPageBreak();
            Paragraph paragraph = section.AddParagraph("Contents");

            paragraph.Format.Font.Size    = 20;
            paragraph.Format.Font.Bold    = true;
            paragraph.Format.SpaceAfter   = 24;
            paragraph.Format.OutlineLevel = OutlineLevel.Level1;
            paragraph.Format.SpaceAfter   = "2cm";

            // Main title
            model.MainTitle.ToList().ForEach(x =>
            {
                paragraph               = section.AddParagraph();
                paragraph.Style         = "TOC 1";
                Hyperlink hyperlinkLvl1 = null;

                // Sub title
                x.SubTitle.ToList().ForEach(u =>
                {
                    if (hyperlinkLvl1 == null)
                    {
                        hyperlinkLvl1 = paragraph.AddHyperlink(u.Id);
                        hyperlinkLvl1.AddText($"{x.Title}\t");
                        hyperlinkLvl1.AddPageRefField(u.Id);
                        paragraph.Format.SpaceAfter = "0.25cm";
                    }
                    paragraph               = section.AddParagraph();
                    paragraph.Style         = "TOC 2";
                    Hyperlink hyperlinkLvl2 = paragraph.AddHyperlink(u.Id);
                    hyperlinkLvl2.AddText($"{(char)160}{(char)160}{(char)160}{(char)160}{u.Title}\t");
                    hyperlinkLvl2.AddPageRefField(u.Id);
                });

                paragraph.Format.SpaceAfter = "1cm";
            });
        }
Esempio n. 11
0
        static void TableOfContents(PdfDocument document)
        {
            // Puts the Table of contents on the second page
            PdfPage   page = document.Pages[1];
            XGraphics gfx  = XGraphics.FromPdfPage(page);

            gfx.MUH = PdfFontEncoding.Unicode;

            // Create MigraDoc document + Setup styles
            Document doc = new Document();

            Styles.DefineStyles(doc);

            // Add header
            Section   section   = doc.AddSection();
            Paragraph paragraph = section.AddParagraph("Table of Contents");

            paragraph.Format.Font.Size    = 14;
            paragraph.Format.Font.Bold    = true;
            paragraph.Format.SpaceAfter   = 24;
            paragraph.Format.OutlineLevel = OutlineLevel.Level1;


            // Add links - these are the PdfSharp outlines/bookmarks added previously when concatinating the pages
            foreach (var bookmark in document.Outlines)
            {
                paragraph       = section.AddParagraph();
                paragraph.Style = "TOC";
                //paragraph.AddBookmark(bookmark.Title);
                Hyperlink hyperlink = paragraph.AddHyperlink(bookmark.Title);
                hyperlink.AddText($"{bookmark.Title}\t");
                //hyperlink.AddPageRefField(bookmark.Title);
            }

            // Render document
            DocumentRenderer docRenderer = new DocumentRenderer(doc);

            docRenderer.PrepareDocument();
            docRenderer.RenderPage(gfx, 1);

            gfx.Dispose();
        }
Esempio n. 12
0
        /// <summary>
        /// Export name to a section in a document
        /// </summary>
        /// <param name="toExport">The data to export from</param>
        /// <param name="sect">The section to write on</param>
        /// <returns>The section with appended data</returns>
        public override Section Export(Leerlijn toExport, Section sect)
        {
            base.Export(toExport, sect);

            //custom code
            Paragraph p = sect.AddParagraph("Modules in deze leerlijn", "Heading2");

            p.AddLineBreak();

            p = sect.AddParagraph();
            p.AddFormattedText("De leerlijnen zijn klikbaar in PDF viewers").Font.Color = Colors.DarkGray;
            p.AddLineBreak();
            p.AddLineBreak();

            foreach (Module m in toExport.Module)
            {
                p.AddFormattedText((m.Naam ?? "Data niet gevonden")).Font.Bold = true;
                p.AddLineBreak();

                p.AddFormattedText("Komt ook voor in:").Font.Color = Colors.DarkGray;
                p.AddLineBreak();

                List <Leerlijn> otherLines = m.Leerlijn.ToList();
                foreach (Leerlijn l in otherLines)
                {
                    if (!l.Naam.Equals(toExport.Naam))
                    {
                        p.AddTab();
                        Hyperlink hyperlink = p.AddHyperlink((l.Naam ?? "Data niet gevonden"));
                        hyperlink.AddText((l.Naam ?? "Data niet gevonden") + ", zie ook pagina ");
                        hyperlink.AddPageRefField((l.Naam ?? "Data niet gevonden"));
                        hyperlink.Font.Underline = Underline.Single;

                        p.AddLineBreak();
                    }
                }
                p.AddLineBreak();
            }

            return(sect);
        }
Esempio n. 13
0
        public static Document CreateDocument()
        {
            // Create a new MigraDoc document
            Document document = new Document();

            document.Info.Title   = " list NOTE";
            document.Info.Subject = " generated file of all list notes";
            document.Info.Author  = "Data Migration Lange";

            DefineStyles(document);
            DefineCover(document);


            Section section = document.LastSection;

            section.AddPageBreak();
            Paragraph paragraph = section.AddParagraph("Table of Contents");

            paragraph.Format.Font.Size    = 14;
            paragraph.Format.Font.Bold    = true;
            paragraph.Format.SpaceAfter   = 24;
            paragraph.Format.OutlineLevel = OutlineLevel.Level1;
            //loop for each item
            {
                paragraph       = section.AddParagraph();
                paragraph.Style = "TOC";
                Hyperlink hyperlink = paragraph.AddHyperlink("Table Overview");
                hyperlink.AddText("Table Overview\t");
                hyperlink.AddPageRefField("Table Overview");
            }

            DefineContentSection(document);
            //for each item do this
            Paragraph paragraph_S = document.LastSection.AddParagraph("Table Overview", "Heading1");

            paragraph_S.AddBookmark("Table Overview");
            Table table = new Table();

            table.Borders.Width = 0.75;

            Column column = table.AddColumn("16cm");

            column.Format.Alignment = ParagraphAlignment.Left;
            //column = table.AddColumn();
            //column.Format.Alignment = ParagraphAlignment.Left;


            Row row = table.AddRow();

            //row.Shading.Color = Colors.PaleGoldenrod;
            //Cell cell = row.Cells[0];
            //cell.Style = "BOLD";
            //cell.AddParagraph("Itemus");
            //cell.Style = "NOR";
            //cell.AddParagraph("sdfsdf sdfsdf sdfsdf ssdfsdfsdf");

            paragraph = row.Cells[0].AddParagraph();
            paragraph.AddFormattedText("hello", TextFormat.Bold);
            paragraph.AddFormattedText(" by ", TextFormat.Italic);
            paragraph.AddLineBreak();
            paragraph.AddText("XXXXX ");



            row = table.AddRow();

            paragraph = row.Cells[0].AddParagraph();
            paragraph.AddFormattedText("hellosdf", TextFormat.Bold);
            paragraph.AddFormattedText(" by ssdfds", TextFormat.Italic);
            paragraph.AddText("XXXXXsdf sdfdsf ");


            table.SetEdge(0, 0, 1, table.Rows.Count, Edge.Box, BorderStyle.Single, 1.5, Colors.Black);

            document.LastSection.Add(table);
            section.AddPageBreak();

            return(document);
        }
Esempio n. 14
0
        public static Document CreateDocument()
        {
            // Create a new MigraDoc document
            Document document = new Document();

            document.Info.Title   = "SAMPLE TITLE NOTE";
            document.Info.Subject = "Auto generated file of all list of items notes";
            document.Info.Author  = "Data Migration ";

            DefineStyles(document);
            DefineCover(document);

            Section section = document.LastSection;

            section.AddPageBreak();
            Paragraph paragraph = section.AddParagraph("Table of Contents");

            paragraph.Format.Font.Size    = 14;
            paragraph.Format.Font.Bold    = true;
            paragraph.Format.SpaceAfter   = 24;
            paragraph.Format.OutlineLevel = OutlineLevel.Level1;

            var list = new List <LogEntry>()
            {
                new LogEntry()
                {
                    LogId     = 1,
                    Desc      = "sdfsdfsd sdf",
                    Summary   = "lorem sdfds sdfs dfds",
                    CreatedOn = DateTime.Now
                },
                new LogEntry()
                {
                    LogId   = 2,
                    Desc    = "XXXX XXXX",
                    Summary = "SSSSS SSSSdfds sdSS SSS fs dfds"
                }
            };


            foreach (var i in list)
            //loop for each item
            {
                paragraph       = section.AddParagraph();
                paragraph.Style = "TOC";
                Hyperlink hyperlink = paragraph.AddHyperlink(i.LogId.ToString());
                hyperlink.AddText(i.Desc + "\t");
                hyperlink.AddPageRefField(i.LogId.ToString());
            }

            DefineContentSection(document);

            foreach (var i in list)
            //loop for each item
            {
                //for each item do this
                Paragraph paragraph_S = document.LastSection.AddParagraph(i.Desc, "Heading1");
                paragraph_S.AddBookmark(i.LogId.ToString());
                Table table = new Table();
                table.Borders.Width = 0.75;

                Column column = table.AddColumn("16cm");
                column.Format.Alignment = ParagraphAlignment.Left;

                Row row = table.AddRow();

                paragraph = row.Cells[0].AddParagraph();
                paragraph.AddFormattedText("hello", TextFormat.Bold);
                paragraph.AddFormattedText(" by ", TextFormat.Italic);
                paragraph.AddLineBreak();
                paragraph.AddText("XXXXX ");

                row       = table.AddRow();
                paragraph = row.Cells[0].AddParagraph();
                paragraph.AddFormattedText("hellosdf", TextFormat.Bold);
                paragraph.AddFormattedText(" by ssdfds", TextFormat.Italic);
                paragraph.AddText(i.CreatedOn?.ToString("MM/dd/yyyy h:mm tt") ?? "");


                table.SetEdge(0, 0, 1, table.Rows.Count, Edge.Box, BorderStyle.Single, 1.5, Colors.Black);

                document.LastSection.Add(table);
            }
            return(document);
        }
Esempio n. 15
0
        private void addBesked()
        {
            Paragraph paragraph = default(Paragraph);

            // Add the notes paragraph
            paragraph = this.document.LastSection.AddParagraph();
            //.Format.Font.Size = 7
            //With .Format
            //    .Font.Size = 8
            paragraph.Format.SpaceBefore = "5mm";
            //    '.Borders.Width = 0.75
            //    '.Borders.Distance = 3
            //    '.Borders.Color = TableBorder
            //    '.Shading.Color = TableGray
            //End With
            paragraph.AddText("Dette tilbud er gældende i 3 uger fra d.d.");
            paragraph.AddLineBreak();

            paragraph = this.document.LastSection.AddParagraph();
            paragraph.Format.SpaceBefore = "5mm";
            //.Format.Font.Size = 7

            paragraph.AddText("Accept af tilbud kan foretages on-line ved fremsendelse af accept på mailadressen ");
            Hyperlink hyp = paragraph.AddHyperlink(string.Format("mailto:{0}?subject=Tilbudnr.{1}", Company.OrdreEmail, TilbudID.ToString()), HyperlinkType.Web);

            //hyp.Font.Size = 7
            hyp.AddText(Company.OrdreEmail);
            paragraph.AddText(" og samtidig oplyse tilbudsnr. ");
            paragraph.AddText(TilbudID.ToString());
            paragraph.AddLineBreak();

            paragraph = this.document.LastSection.AddParagraph();
            paragraph.Format.SpaceBefore = "5mm";
            //.Format.Font.Size = 7
            paragraph.AddText("Såfremt der er spørgsmål");
            paragraph.AddText(" – eller korrektioner");
            paragraph.AddText(" – til det fremsendte tilbud, er du meget velkommen til at kontakte os på telefon nr. ");
            paragraph.AddText(Company.phone);
            paragraph.AddLineBreak();

            paragraph = this.document.LastSection.AddParagraph();
            paragraph.Format.SpaceBefore = "5mm";
            //.Format.Font.Size = 7
            paragraph.Format.Alignment = ParagraphAlignment.Center;
            paragraph.AddText("Med venlig hilsen");
            paragraph.AddLineBreak();

            Font FontTal = new Font();

            FontTal.Color = new Color((byte)255, (byte)0, (byte)0);
            FontTal.Bold  = true;
            paragraph     = this.document.LastSection.AddParagraph();
            paragraph.Format.Alignment = ParagraphAlignment.Center;
            paragraph.AddText(Company.name);
            paragraph.AddLineBreak();

            //paragraph = Me.document.LastSection.AddParagraph()
            //With paragraph
            //    .Format.SpaceBefore = "1,5cm"
            //    '.Format.Font.Size = 7
            //    .Format.Alignment = ParagraphAlignment.Center
            //    .AddText("Kamilla Rye	/	Lennart Funch")
            //    .AddLineBreak()
            //End With

            paragraph = this.document.LastSection.AddParagraph();
            paragraph.Format.SpaceBefore = "1cm";
            //.Format.Font.Size = 7
            paragraph.AddText("Bilag:");
            paragraph.AddLineBreak();
            paragraph.AddText(" · ");
            paragraph.AddText("Salgs- og leveringsbetingelser");
            paragraph.AddLineBreak();
            paragraph.AddText(" · ");
            paragraph.AddText("Produktark");
            //.AddLineBreak()
        }