Hi Jonam,
Thanks for your interest in Essential PDF.
You cannot set the text alignment of header by using header.Graphics.DrawText. It can be possible by using header.Graphics.DrawMultiText.
//Set the header Textalignment as right
props.TextAlignment = TextAlignment.Right;
Rectangle rect = new Rectangle( 0,0,(int)doc.LastPage.DrawingWidth-10,40);
header.Graphics.DrawMultiText( rect,title, font, props );
//Set the table header Textalignment as right
table.Header[0].Cells[i].Style.TextAlignment = TextAlignment.Right;
You can repeat the header for all pages by using RepeatHeader property
//For repeating the header to all pages
table.RepeatHeader = true;
Kindly try running the attached sample and let me know if you have any other queries.
Best Regards,
Bhuvaneswari
sampleHeaderalign.zip