2
Answers

Creating PDF document with custome headers and footers

Hi,
 
I want to create a pdf document programmatically in C# 3.5 with custom headers and footers along with margins, is this possible to generate pdf with headers and footers with customized fonts and styles and the same pdf file will be created in multiples at-once in one single document, Please suggest the possible way to achieve it.
 
Any kind of code can be more helpful.
 
Answers (2)
0
Nir Bar
NA 773 0 15y
Hi Petre,

There isn't an automatic way of doing it.
I think the best way will be to count day-by-day in a loop:
int count = 0;
for( DateTime d = dt1.Value.Date; d <= dt2.Value.Date; d = d.AddDays(1))
{

if(( d.DayOfWeek != DayOfWeek.Saturday) && (d.DayOfWeek != DayOfWeek.Sunday))
{
++count
}
}
return count


Please mark this post as an answer if it helps you

Nir