Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By SmithClr
#827564
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

Hi, Please set max_input_vars=8000 in your php.in[…]

Total cases using REST

I want to get total number of created cases using […]

Mixed content block

Hi everyone, I need some help as I am getting an […]

pmusers.org

Hi Amo, I saw your new post today and I can't rep[…]