Discussions

Ask a Question
Back to all

cant use custom font in footer

so im using the literal example in this documentation in regards to using a custom font in my footer and its not working, no errors are thrown, it just doesnt show the footer when the pdf is generated:

https://docs.convertapi.com/docs/web-to-pdf-headers-and-footers

my params are:

var params = convertApi.createParams();
params.add('FileName', pdfFileName);
params.add('url', pdfURL);

                params.add('Version', '140'); // currently 'latest' == 140 ... 

                params.add('WaitElement', '#PrintReady');
                params.add('ConversionDelay', '5');
              
                params.add('MarginLeft', '0'); //10 is default
                params.add('MarginRight', '0'); //10 is default
               
                params.add('CssMediaType', 'print'); //screen is default
                params.add('FooterHeight', '20'); // Adjust the value as needed

$footerForPrint = `

This is my custom font header

`;

params.add('Footer', $footerForPrint);

the url im sending is this:

https://forresterstage.mainstayadvisor.com//go//microsoft//windows365link//index.html?lang=ja-jp&printpdf=1&seed=1765924876616&printcontent=undefined

the footer is shown correctly if i dont try and embed the base64 font... but my document is in Japanese so i need a custom font for the footer.. Noto Sans JP specifcally.

But nevertheless, i was getting the same results with that as i was with the Dorsa font-family that is used in the documentation.. ie. no errors per say.. but the footer will just not show in the resulting PDF. Why??

Thanks in advance!

-Scott