In this article an explanation of ”Apply Styles and Fonts” plugin will be presented.
Go to Company data and upload .dotx and .potx with the correct styles and/or fonts in the file.
Go to Company Data first. Create the data source Styles and Fonts. (this data source will be used later on in forms and plugin configuration groups).
Once you open it, you make/look at a table with id, StyleName and FileName columns.
StyleName column will be the one later on used in Forms, therefore, these names will be seen by the end user.
FileName column indicates the names of the templates located in the blob, therefore, it is really important to make sure that the template name would match the file name in this graph (ex.: Template1.potx = Template1).
Go to Forms and find/create Apply Fonts form.
In the Apply Fonts form first add a field called FontStyle (it will be necessary to specify this later).
Choose Data Source from the previous step (Apply Styles and Fonts). Choose Label Column as the StyleName, which we set up before.
Go to Plugin configuration groups. Choose/ create the ApplyFonts plugin.
Choose and add the plugin configurations called Apply styles and fonts.
The plugin uses this tag string to indicate what font should be applied. Enter this tag string in the Style name section
Document refers to a form;
FontStyle refres to the form field containing the font choice (which we have created in the previous step);
StyleName refer to the column in the data source from the previous step;
In the Data source field choose the data source containing the font and styles.
Lastly, we go in to Templates. Upload or choose a template that you would like to assign this function to.
Apply the right form and the right plugin.
This is the result for the end user:
Once the template will be downloaded, it will have the chosen fonts already embedded to it.
If the client has issues with seeing the right fonts in the previews, please read this.
NOTE: It is possible to make a plugin without giving the end user an option to choose the right font. In this case, you do not have to create a form (skip STEP 2). Just create a new data source, specify it in the newly created plug in and, lastly, assign the plug in to the template.