Page 1 of 1

How to add custom fonts in PDF Generator

Posted: Mon Feb 17, 2020 1:23 pm
by SmithClr
I am trying to add custom font "Ubuntu-Medium.tff" in my pdf genrator function i have used the following code
Code: Select all
public override void OnOpenDocument(PdfWriter writer, Document document)
        {
            try
            {
                PrintTime = DateTime.Now;
                BaseFont  bf =aseFont.CreateFont("..\\Content\\Fonts\\Ubuntu - Medium.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
               PdfContentByte cb = writer.DirectContent;
                headerTemplate = cb.CreateTemplate(document.PageSize.Width, document.PageSize.Height);
                footerTemplate = cb.CreateTemplate(document.PageSize.Width, document.PageSize.Height);
            }
            catch (DocumentException de)
            {

            }
            catch (System.IO.IOException ioe)
            {

            }
        }
but when i try to run my solution it throws an error as "..\Content\Fonts\Ubuntu - Medium.ttf not found as file or resource."

I just want to use the Ubuntu - Medium.ttf font in my pdf. Please guide me

Re: How to add custom fonts in PDF Generator

Posted: Fri Apr 17, 2020 6:09 pm
by RicardoMG
Hello!

If you want to do this change you can see the following:
https://forum.processmaker.com/viewtopic.php?t=736741

Best Regards, Ricardo!

Re: How to add custom fonts in PDF Generator

Posted: Sat Dec 04, 2021 8:33 am
by MaryStruck
Process maker is furnished for the room for all standing devices. The theme of the https://www.brillassignment.co.uk/essay-writing-services/ are done for the offers. Skills are dumped for the mid use of the factors for the dials for all parts.

Re: How to add custom fonts in PDF Generator

Posted: Sat Feb 12, 2022 7:52 am
by DesireeScott
Whether moving or just switching, it can help if you know other people in the area. This is a great way to get information on doctors. You can ask them what doctor they use and if they https://bestdoctornearme.com feel comfortable with them. You can easily find out how experienced the doctor is and if they are open and friendly. You can ask questions about how the doctor handles existing conditions and treatments. Friends and family can be a very vital source of information.

Re: How to add custom fonts in PDF Generator

Posted: Thu Nov 09, 2023 5:32 am
by learningdumps
What is embedding precisely? Essentially, embedding fonts into PDF files means that all the font data you need to make your document appear a certain way is preserved in the VMware 2V0-21.20 PDF file itself. This way, the person reading the document will be able to see it exactly the way you intended, regardless of the fonts they have installed on their computer. In essence, a font that is embedded inside a PDF enables the PDF to identify the font and present it in the way that it was meant to. www.dumpszone.com /2V0-21-20-braindumps .html

Re: How to add custom fonts in PDF Generator

Posted: Tue Mar 26, 2024 5:09 am
by programerboy
Hi,
You can use this "Office template maker" plugin and easily create your templates in Microsoft Office and call them in your processes and forms:

http://pmlearning.info/plugin.php?t=Office-Print-Templates-Plugin-ProcessMaker
Thanks