PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
You can edit the font family on the panel of the content editor. The following code shows you how to set the font family:
const customFonts = instance.UI.getCustomFonts();
// Add a custom font
customFonts.push({
fontFamily: "CustomFont",
fontName: "CustomFont"
});
// Remove the font
customFonts.splice(0, 1);
// You can also set the order of the fons
const font = customFonts[0];
customFonts[0] = customFonts[1];
customFonts[1] = font;You can also set the font size on the panel of the content editor. The following code shows you how to set the font size:
// Get font sizes
instance.UI.getFontSizes();
// Set font sizes
instance.UI.setFontSizes([12, 14, 16, 18, 20]);