Word docx size

Jun 18, 2015 at 11:53 AM
Hi ,
i am new to Novacode Docx ,
i build a program which read c# label and textbox and get 3 pictures on it.(docx)
i have a problem about save my document , when otomatically save my document has a 3.76 MB but when the word is open and i save as dificult name its 576 kb,.
can anyone help me please.

here is my code :

string filename = "Doc1.docx";
        string outputmail = @"D:\\mail/kibdeniztr.docx";
        string outputweb = "D:\\MetDeniz/MetDeniz/MetDeniz/web/word/tr/web.docx";
        string outputarsiv = "D:\\MetDeniz/MetDeniz/MetDeniz/arsiv/word/tr/" + label19.Text + "tr.docx";
        // Create a document.
        using (DocX document = DocX.Create( filename))
            {


                  // Add a Table to this document.
                Novacode.Table table = document.AddTable(1, 3);
                document.MarginTop = 10;
                document.MarginBottom = 10;
                document.MarginLeft = 25;
                document.MarginRight = 25;

                table.AutoFit = AutoFit.Window;

                Novacode.Border top = new Novacode.Border(Novacode.BorderStyle.Tcbs_none, BorderSize.one, 1, Color.White);
                Novacode.Border left = new Novacode.Border(Novacode.BorderStyle.Tcbs_none, BorderSize.one, 1, Color.White);
                Novacode.Border right = new Novacode.Border(Novacode.BorderStyle.Tcbs_none, BorderSize.one, 1, Color.White);
                Novacode.Border bottom = new Novacode.Border(Novacode.BorderStyle.Tcbs_none, BorderSize.one, 1, Color.White);

                float availableSpace = document.PageWidth - document.MarginLeft - document.MarginRight;


               //   table.Alignment = Alignment.center;

               // document.PageWidth = 1000;
                 // Add a Hyperlink into this document.

                 // Add an Image into this document.
                  Novacode.Image i = document.AddImage(@"D://MetDeniz/MetDeniz/MetDeniz/ikon/kktclogpng.png");
                  // Create a Picture (Custom View) of this Image.
                 Picture p = i.CreatePicture();
                 p.Width = 90;
                 p.Height = 90;
                // p.Rotation = 10;//resim döndürür
                 // Add an Image into this document.
                 Novacode.Image j = document.AddImage(@"D://MetDeniz/MetDeniz/MetDeniz/ikon/kibOff.png");
                 // Create a Picture (Custom View) of this Image.
                 Picture p1 = j.CreatePicture();
                 p1.Width = 90;
                 p1.Height = 90;
                 // p.Rotation = 10;//resim döndürür
                 // Specify some properties for this Table.
                 // table.Design = TableDesign.LightShadingAccent2;
                 table.Design = TableDesign.TableGrid;
                 // Insert the Table into the document.
                 Novacode.Table t1 = document.InsertTable(table);

                // Add content to this Table.
               //  t1.Rows[0].Cells[0].Width = 10;
                 t1.Rows[0].Cells[0].Paragraphs.First().AppendPicture(p).Alignment = Alignment.left;

                    t1.Rows[0].Cells[0].SetBorder(TableCellBorderType.Top, top);
                    t1.Rows[0].Cells[0].SetBorder(TableCellBorderType.Left, left);
                    t1.Rows[0].Cells[0].SetBorder(TableCellBorderType.Right, right);
                    t1.Rows[0].Cells[0].SetBorder(TableCellBorderType.Bottom, bottom);
                    t1.Rows[0].Cells[0].Width = Math.Round(0.2 * availableSpace);


                // t1.Rows[0].Cells[1].Width =80;
                 t1.Rows[0].Cells[1].Paragraphs.First().Append("Kuzey Kıbrıs Türk Cumhuriyeti").FontSize(14).Color(Color.Red).Bold().AppendLine("Çevre Ve Doğal Kaynaklar Bakanlığı").FontSize(14).Color(Color.Red).Bold().AppendLine("Meteoroloji Dairesi").FontSize(13).Color(Color.Red).Bold().AppendLine("Tel : (0392) 2271730   Fax: (0392) 2284250").FontSize(10).Color(Color.Blue).AppendLine("mail : www.kktcmeteor.org").FontSize(10).Color(Color.Blue);
                 t1.Rows[0].Cells[1].Paragraphs.First().Alignment = Alignment.center;
                 t1.Rows[0].Cells[1].SetBorder(TableCellBorderType.Top, top);
                 t1.Rows[0].Cells[1].SetBorder(TableCellBorderType.Left, left);
                 t1.Rows[0].Cells[1].SetBorder(TableCellBorderType.Right, right);
                 t1.Rows[0].Cells[1].SetBorder(TableCellBorderType.Bottom, bottom);
                 t1.Rows[0].Cells[1].Width = Math.Round(0.6 * availableSpace);

               //  t1.Rows[0].Cells[2].Width = 10;
                 t1.Rows[0].Cells[2].Paragraphs.First().AppendPicture(p1).Alignment = Alignment.right;
                 t1.Rows[0].Cells[2].SetBorder(TableCellBorderType.Top, top);
                 t1.Rows[0].Cells[2].SetBorder(TableCellBorderType.Left, left);
                 t1.Rows[0].Cells[2].SetBorder(TableCellBorderType.Right, right);
                 t1.Rows[0].Cells[2].SetBorder(TableCellBorderType.Bottom, bottom);
                 t1.Rows[0].Cells[2].Width = Math.Round(0.2 * availableSpace);


                 Novacode.Paragraph par1 = document.InsertParagraph();
                 par1.Append("                                                         DENİZLERİMİZE AİT HAVA TAHMİN BÜLTENİ                ").FontSize(13).Color(Color.Red).Bold();
                 par1.AppendLine("PERİYODU :                                                                ").FontSize(12).Color(Color.Red).Bold().Append("                                                                                    YAYIN :").FontSize(12).Color(Color.Red).Bold();
                 par1.AppendLine("Başlangıç :   ").FontSize(10).Color(Color.Blue).Bold().Append(label19.Text).FontSize(10).Color(Color.Black).Bold().Append("   Bitiş  :   ").FontSize(10).Color(Color.Blue).Bold().Append(label61.Text).FontSize(10).Color(Color.Black).Bold().Append("                                                                                                                           Tarih :  ").FontSize(10).Color(Color.Blue).Bold().Append(label19.Text).FontSize(10).Color(Color.Black).Bold();
               //  par1.AppendLine("Bitiş          :   ").FontSize(10).Color(Color.Blue).Bold().Append(label61.Text).FontSize(10).Color(Color.Black).Bold();
               //  par1.AppendLine(" ");

                 Novacode.Paragraph par2 = document.InsertParagraph();
                 par2.Append("Birinci Gün : ").FontSize(10).Color(Color.Red).Bold().Append(label19.Text).FontSize(10).Color(Color.Blue).Bold();

                Novacode.Table table1 = document.AddTable(1, 2);
        //         document.MarginTop = 5;
             //    document.MarginBottom = 5;
            //     document.MarginLeft = 30;
            //     document.MarginRight = 30;
           //      table1.AutoFit = AutoFit.Contents;
                 // Add an Image into this document.
                 Novacode.Image y = document.AddImage(@"D://MetDeniz/MetDeniz/MetDeniz/web/resim/Gun1.bmp");
                 // Create a Picture (Custom View) of this Image.
                 Picture Gun1 = y.CreatePicture();
                 Gun1.Width =300;
                 Gun1.Height = 260;
                 table1.Design = TableDesign.TableGrid;
                 table1.Alignment = Alignment.center;
                 Novacode.Table t2 = document.InsertTable(table1);

                 t2.Rows[0].Cells[0].Width = 300;
                 t2.Rows[0].Cells[0].Paragraphs.First().AppendPicture(Gun1);
                 t2.Rows[0].Cells[1].Width = 400;
                 t2.Rows[0].Cells[1].Paragraphs.First().Append("Fırtına : ").FontSize(9).Color(Color.Red).Bold().Append(label20.Text).FontSize(9).AppendLine(" ").AppendLine("Taurus : ").FontSize(9).Color(Color.Red).Bold().Append(label21.Text).FontSize(9).Append("  Rüzgar : ").FontSize(9).Color(Color.Red).Bold().Append(label22.Text).FontSize(9).Append("  Dalga : ").FontSize(9).Color(Color.Red).Bold().Append(label23.Text).FontSize(9).Append("  Görüş : ").FontSize(9).Color(Color.Red).Bold().Append(label24.Text).FontSize(9).AppendLine("").AppendLine("Crusade : ").FontSize(9).Color(Color.Red).Bold().Append(label25.Text).FontSize(9).Append("  Rüzgar : ").FontSize(9).Color(Color.Red).Bold().Append(label26.Text).FontSize(9).Append("  Dalga : ").FontSize(9).Color(Color.Red).Bold().Append(label27.Text).FontSize(9).Append("  Görüş : ").FontSize(9).Color(Color.Red).Bold().Append(label28.Text).FontSize(9).AppendLine("").AppendLine("Delta : ").FontSize(9).Color(Color.Red).Bold().Append(label29.Text).FontSize(9).Append("  Rüzgar : ").FontSize(9).Color(Color.Red).Bold().Append(label30.Text).FontSize(9).Append("  Dalga : ").FontSize(9).Color(Color.Red).Bold().Append(label31.Text).FontSize(9).Append("  Görüş : ").FontSize(9).Color(Color.Red).Bold().Append(label32.Text).FontSize(9);

                 Novacode.Paragraph par3 = document.InsertParagraph();
                 par3.Append("İkinci Gün : ").FontSize(10).Color(Color.Red).Bold().Append(label33.Text).FontSize(10).Color(Color.Blue).Bold();


                 Novacode.Table table2 = document.AddTable(1, 2);
        //         document.MarginTop = 5;
        //         document.MarginBottom = 5;
        //         document.MarginLeft = 30;
        //         document.MarginRight = 30;
        //         table2.AutoFit = AutoFit.Contents;
                 // Add an Image into this document.
                 Novacode.Image z = document.Add
Jul 19, 2015 at 2:16 AM
Dude, You have posted your question at wrong place.
This place is for discussion of service of CodePlex.
Codeplex is an Open source project hosting site.
I believe you are asking something related to specific project which is hosted in CodePlex.
You won't find any answer here.
Try look for your project at [Search] at top right side of this page.