Settings the font for PDF whole report

Dear Tommy,

I have created a PDF template in XML & loading it using BindXML method. I din’t mention the font name anywhere. But based on the user settings, i have to set the font for the report.

What is the way to set the font name to whole report?

Please note that, template has multiple sections & multiple tables in each sections

Thanks

Regards,
Ramesh J

Dear Ramesh,

Thank you for consideirng Aspose.

You can set the font name in the Pdf element. That will make sure the whole report will use that font.

Dear Tommy,

Thanks for your reply.

In the PDF template, I can’t hard code the font name. Because, it should be dynamic based on user settings.

Please give me example to do it using code.

Regards,
Ramesh J

Dear Ramesh,

Thank you for considering Aspose.

You can find some examples about Font Handling at Formatting PDF document. You can also refer to HelloWorldApiAndXml about how to change the contents in XML via API.