Пример #1
0
		public static void CreatePdf()
		{
			Console.WriteLine("Creating a PDF");
			
			var department = Departments.GetById(13); // IT Department = 13
			
			// Get ALL badges for a deparment.
			var badges = Volunteers.GetBadgesByDepartment(department);
			
			// Use BadgePdfBuilder to create badges PDF
			var builder = new BadgePdfBuilder(badges);
			// Create the file and return filename
			var fileName = builder.CreatePdf();
			
			// Open the file.
			var process = Process.Start(fileName);
		}
Пример #2
0
		private void MakePdfFile(List<Badge> badges, bool useLocalVolunteerDesign = false)
		{
			ConsoleX.WriteLine("Ok. Generating a PDF of badges for you...");
			// Use BadgePdfBuilder to create badges PDF
			// Create the file and return filename
			var builder = new BadgePdfBuilder(badges);
			builder.UseLocalVolunteerDesign = useLocalVolunteerDesign;
			var fileName = builder.CreatePdf();
			// Open the file.
			ConsoleX.WriteLine("Opening the file for you.");
			var process = Process.Start(fileName);
			ConsoleX.WriteLine("Done.");
		}