We create a PdfDocument, not a (MigraDoc) Document

62

We create a PdfDocument, not a (MigraDoc) Document -

static void Main()
{
  DateTime now = DateTime.Now;
  string filename = "MixMigraDocAndPdfSharp.pdf";
  filename = Guid.NewGuid().ToString("D").ToUpper() + ".pdf";
  PdfDocument document = new PdfDocument();
  document.Info.Title = "PDFsharp XGraphic Sample";
  document.Info.Author = "Stefan Lange";
  document.Info.Subject = "Created with code snippets that show the use of graphical functions";
  document.Info.Keywords = "PDFsharp, XGraphics";
 
  SamplePage1(document);
 
  SamplePage2(document);
 
  Debug.WriteLine("seconds=" + (DateTime.Now - now).TotalSeconds.ToString());
 
  // Save the document...
  document.Save(filename);
  // ...and start a viewer
  Process.Start(filename);
}

Comments

Submit
0 Comments