any examples? Using DynaPDFMBS to load font on linux webserver

Hi Christian and other DynaPDFMBS experts.
Ive gotten my pdf making working well on the Mac web app.
Of course loading it to the LINUX server I encounter font issues.

I’ve found a couple of commands (below) but I’m a bit lost on how to use them.

Is there an examples somewhere to help?

if TargetLinux then call pdf.AddFontSearchPath "/fonts", true call pdf.LoadFontEx("/fonts", 1, 10, true) else // on Mac and Windows we use system fonts. end if

A big thanks up front.
Cheers
James

Hi James,

The font path is probably different, depending on your linux flavour.
Mine is /usr/share/fonts/msttcorefonts on a Linux server hosted by serverwarp.

if TargetLinux then Call pdf.AddFontSearchPath ("/usr/share/fonts/msttcorefonts", True)

But, of course, fonts must be installed on the server. Are they ?

I’ve not seen a Linux with fonts in a /fonts folder. Where did you get that?

Hi Christian
I tried to use a build folder under the CGI folder called fonts where I put my own fonts, and then try and direct it from there. Maybe the path should have been… “…/fonts”. Maybe a bit naive…
But Ill try Oliver’s path

Hi Oliver
[edited: No I havent]
unless there are some system fonts I dont know.

[quote=437704:@James Nicholson-Plank]Hi Christian
I tried to use a build folder under the CGI folder called fonts where I put my own fonts, and then try and direct it from there. Maybe the path should have been… “…/fonts”. Maybe a bit naive…
But Ill try Oliver’s path[/quote]
If you use a CopyFiles step the right way, you can use SpecialFolder.Resources.

Hi Tim
never played with resources folder path before.

How do I load files to Resource Folder using the copyFiles ?.
I used CopyFiles to upload the Fonts folder and fonts. It’s a drag and drop thing, so not sure how I ask files to go to a specific place?
Excuse my ignorance in this area.
Thanks

If you use the standard PDF fonts, you won’t need a PDF fonts folder.

see
https://www.mbsplugins.de/archive/2015-01-29/PDF_Standard_Fonts

Brilliant

Thanks Christian

With the CopyFiles step selected in the navigator, the inspector offers you a few settings one of them is “Destination”. Select “Resources Folder” as the destination, and the items in the copy files step are accessible with SpecialFolder.Resources (if you have a newer Xojo - if you have an older one you can use TPSF)

We usually also install msttcorefonts package and than point to the folder with all those fonts.
So we can use names like Arial and Verdana.

If Phillip installs these by default that’s very useful. However your standard PDF fonts will definitely do the trick.

TIM
Thanks for that. Didn’t realise that.This will be very useful in the future.
Cheers James