Jump to content
TNG Community

PDF font - can't open font


GaryK4

Recommended Posts

I just upgraded from 12.0 to 13.0. Doing some testing, outputting a PDF Chart fails.

Can't open file /var/www/html/tng/font/unifont/DejaVuSans/DejaVuSansB.ttf

I navigated to the file and it is there. The file permissions are open.

This fails from multiple computers.

Link to comment
Share on other sites

Thanks to your post, I checked and learned I had a similar issue. 

Mine involved pdf  Histories and Word documents for some stories. I had to first go back in to Admin and reload, or re-link if you will, those files in the appropriate Media section - Histories, Documents, etc.

After relinking them all, since I had links/ buttons on my Home page pointing to them, I went in to the Template settings and renewed the links in the appropriate places there.

I'm not sure that's your exact issue but I would guess it may be. 

Be glad to hep if I can.

Mike

https://ellisofelkpark.com/

Template 207

 

Link to comment
Share on other sites

Gary,
      If you delete the cached fonts, they are the cw127.php and mtx.php files in each of the DejaVu font folders, that should clear out the cached font paths and other data that is probably at the root of the problem.  Usually if you can see the path to the font file and it looks good then it is something bad in one of the cache files.  After deleting those files and running your pdf charts again, the software will regenerate the cache files and your reports should work.

Brent

Link to comment
Share on other sites

I had my message set to notify me, but your answers went to spam. I fixed that.

I'm not sure what you are telling me to do. I don't see any cw127.php files in the DejaVu font folders. I do have (dejavusans.cw.dat, dejavusans.mtx.php, dejavusansb.cw.dat, dejavusansb.mtx.php) files. I created a save folder and moved the (4) files to it.
When I tried creating the pdf report, I got the same error. The program created files(dejavusans.cw.dat, dejavusans.mtx.php). 
The error is referring to DejaVuSansB.ttf, so I would have expected files (dejavusansb.cw.dat, dejavusansb.mtx.php). But I'm not sure what I am doing, so this is a pure guess.

Am I doing something wrong?

Thanks

 

Link to comment
Share on other sites

Yes the cw.dat file is one of the files and I just overlooked listing it.  Is the file named DejaVuSansB.ttf in exactly that case with only those specific 4 letters capitalized?  The cache files that would get created  for DejaVuSansB only get created after the point where it is giving that error about not being able to find the font file, so since the error happens it doesn't get far enough to create them.  As long as the ttf file is named correctly in the right path and there aren't old cache files that could confuse the pdf generator about the location of the ttf file, there isn't anything that you should really be able to affect.

Link to comment
Share on other sites

No, DejaVuSansB.ttf was DejaVuSansb.ttf .  I manually renamed it to DejaVuSansB.ttf and it now works.
I don't know why it is wrong or how many other files names are still wrong. However, now I know what to look for. Below is a snapshot of the current folder.

fonts.jpg

Link to comment
Share on other sites

That makes sense.  In TNG 12, the tfpdf version used lowercase b and i for the bold and italic font styles.  For the tfpdf version included in TNG 13, it uses uppercase B and I for the bold and italic font styles.  Windows doesn't care about the capitalization and so it considers DejaVuSansB the same as dejavusansb and DejaVuSansb, but Linux considers each capitalization a different file.  So from your snapshot of the folder, it looks like dejavusansbi and dejavusansi are both versions that would error if there is any italic or italic bold font usage.  You would probably want to check out the other DejaVu font folders to make sure they have the correct capitalization as well, in case a user changes the font to one of the other font options.

Link to comment
Share on other sites

I kept the V13 find on a storage drive and it has the correct case. I am very familiar with Linux / UNIX. I don't know what happened. I copied all the files per the video.
Anyway, I just deleted all the file/folder under fonts and re-copied them to the server. Then I checked the folder ran the PDF again. All is good.
Just one of those mysteries of life 😀

Thank, Hopefully I am all set.

Link to comment
Share on other sites

My guess would be that the ftp client must have decided that you intended to overwrite the existing files with the existing case name, probably due to making a case insensitive file name comparison, instead of thinking that you wanted them with the new case naming and made that perceived fix for you.  Sometimes software can be too helpful.  So yes deleting the folder under fonts and re-uploading is the easy way to resolve and make sure to have the files named correctly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...