PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Concatenate Documents question.
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2454
Page 1 of 1

Author:  PdfStarter [ Thu May 16, 2013 5:34 pm ]
Post subject:  Concatenate Documents question.

can someone tell me what is the string files[]=getfiles() : in PDFsharp Sample: Concatenate Documents ? there isn't any implementation of the method in the code..

Author:  Thomas Hoevel [ Tue May 21, 2013 8:35 am ]
Post subject:  Re: Concatenate Documents question.

Download the source package and you get the full working sample.

GetFiles() is not relevant to what the sample shall show.

Code:
/// <summary>
/// Put your own code here to get the files to be concatenated.
/// </summary>
static string[] GetFiles()
{
  DirectoryInfo dirInfo = new DirectoryInfo("../../../../../PDFs");
  FileInfo[] fileInfos = dirInfo.GetFiles("*.pdf");
  ArrayList list = new ArrayList();
  foreach (FileInfo info in fileInfos)
  {
    // HACK: Just skip the protected samples file...
    if (info.Name.IndexOf("protected") == -1)
      list.Add(info.FullName);
  }
  return (string[])list.ToArray(typeof(string));
}

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/