We just rolled out a new Web API endpoint which returns available font names that can be used to create and merge templates for merge processes with ReportingCloud.

https://api.reporting.cloud/v1/fonts/list

The cross-browser HTML5-based template editor provides fonts that can be used to design merge templates. But ReportingCloud also provides a functionality to upload MS Word documents in standard formats such as RTF, DOC, and DOCX. In order to ensure that only supported fonts are used, this new endpoint can be used to retrieve this list.

The following curl call shows the usage of this endpoint:

curl -u username:password \
-X GET "https://api.reporting.cloud/v1/fonts/list

On success, it returns an array of available font names:

[
"Arial",
"Times New Roman",
"Segoe UI"
]

The .NET wrapper for ReportingCloud has been extended with the ListFonts method:

using System;
using System.Collections.Generic;
using TXTextControl.ReportingCloud;
class RCSamples
{
public static void ListFonts()
{
ReportingCloud rc = new ReportingCloud(
"username",
"password",
new Uri("https://api.reporting.cloud"));
// list all templates
string[] fonts = rc.ListFonts();
foreach (string font in fonts)
{
Console.WriteLine(font);
}
}
}

Test this on your own and create a trial account today.

Happy coding!