LongDoc1.cs
  1. //
  2. // This code is part of Document Solutions for Word demos.
  3. // Copyright (c) MESCIUS inc. All rights reserved.
  4. //
  5. using System;
  6. using System.IO;
  7. using System.Drawing;
  8. using GrapeCity.Documents.Word;
  9.  
  10. namespace DsWordWeb.Demos
  11. {
  12. // In this sample, we create a 1000-paragraph document of Lorem Ipsum.
  13. public class LongDoc1
  14. {
  15. public GcWordDocument CreateDocx()
  16. {
  17. GcWordDocument doc = new GcWordDocument();
  18.  
  19. var pars = doc.Body.Sections.First.GetRange().Paragraphs;
  20. for (int i = 0; i < 1000; ++i)
  21. pars.Add(Util.LoremIpsumPar());
  22. return doc;
  23. }
  24. }
  25. }
  26.