Add Variables Into Header (Word/PDF)

1 Answer 9 Views
PdfProcessing WordsProcessing
Alex
Top achievements
Rank 1
Alex asked on 04 Apr 2025, 07:07 PM
Is it possible to add text to headers based on variables/database fields? I'm trying to loop through a table and use a field within the table as a page title, but all information I could find on this points to it being impossible in Telerik. Guidance would be much appreciated. 

Thanks

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Apr 2025, 06:14 AM

Hi, Alex,

According to the provided information, it is not clear enough which is the exact library that you are currently using. I suppose that it is RadWordsProcessing (considering the title of this ticket) which supports exporting to DOCX and PDF format. Please correct me if I am wrong.

RadFlowDocument and its internal document's structure provides convenient API so you can create the header you need, allowing you to insert paragraph and text elements in a similar way like you do it for the main document. It doesn't matter if the header's information is extracted from a database or some other source. Please have a look at the following article to get started with the functionality: Headers and Footers.

Please give it a try and see how it works for the scenario you need to cover. If you need any further assistance please don't hesitate to get back to us with the specific requirement you are trying to achieve. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

Tags
PdfProcessing WordsProcessing
Asked by
Alex
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or