PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Jul 05, 2024 12:21 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu May 16, 2013 5:34 pm 
Offline

Joined: Tue May 14, 2013 7:21 pm
Posts: 3
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..


Top
 Profile  
Reply with quote  
PostPosted: Tue May 21, 2013 8:35 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
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));
}

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 108 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group