Free Support Forum - aspose.com

Add horizontal line below a specific text fragment in PDF using C# code with Aspose.PDF for .NET

How can we add horizontal line below a specific text fragment in PDF using c# code.
I have a header and it will be repeating in each page. This header is in for loop and displaying header with thehelp of text fragment…
I just want to add horizontal line below of this header for each page in PDF.
Kindly help me.

@srinubaddi856,

I have observed your comments. Can you please visit this thread link. This will help you to achieve your requirements. Please share feedback with us if there is still an issue.

@Adnan.Ahmad thank you for the update… but when i click on the link(thread) throwing error as “Sorry, you dont have access to this topic” . i have a license for this library…can you please help me .

@srinubaddi856,

Can you please check now and share feedback with us.

@Adnan.Ahmad thank you for the update…
My question is, need to add horizontal line below the header…
We can easily find the footer position easily but my requirement is to add line to header…
Line width should be 2px
Header will display in PDF page dynamically along with dynamic tables and we don’t know the position of header (where it will display)
So, I guess first we need to find out position of header and then draw a horizontal line to that header below…

Kindly provide samples for the above requirement.

@srinubaddi856,

Please accept my apologies. I have shared new link which contain sample code to add line below header. Earlier I shared sample code to add horizontal line below footer.