Message Boards Message Boards

Render text correctly when saving it as PDF?

Posted 5 years ago

I'm using Mathematica 12.0 for the first time on Ubuntu 18.04. When I save a completed notebook as a PDF so that I can print it, the text renders incorrectly. I have attached a photo of the problem. I've tried updating my fonts in my library, but I don't know what else to try. Thanks in advance. I am also unable to import the created PDF into Mathematica.

https://imgur.com/a/Vud7Qqx

5 Replies

It ended up being an issue with certain fonts not being installed correctly. Unfortunately, that's all the detail I can offer; I resolved this months ago and had forgotten about making this post at the time of the fix.

Anonymous User
Anonymous User
Posted 4 years ago

I think it would be worthwhile to buy a used iMac or PC to run Mathematica: well worth the price. Spending hours on TeX re-do's is not productive toward your goal and may not survive any upgrade.

On the other hand, Mathematica has instructions for installing on Linux (which, if you are 100% installed as they are, should work without re-do's).

The time you spent already is spent on the issue of fixing things that, on iMac and PC, are not broken.

POSTED BY: Anonymous User

I managed to fix my other Fedora 31 machines. You also have to remove the packages texlive-sourcecodepro, texlive-sourcesanspro, and texlive-sourceserifpro. It might be that texlive-sourcecodepro is enough, but even so, a lot of extra texlive packages are removed along the way because of dependencies on those three font packages. None of these other packages look critical. However, a lot of Mathematica users also use TeX, so there may be a more serious problem lurking here.

If you're still seeing that weirdness on Ubuntu, I'd suggest looking for installed fonts that overlap with the fonts in /usr/local/Wolfram/Mathematica/12.0/SystemFiles/Fonts/. Maybe removing one of them will help, but it might make some other program unusable.

I'm getting a different kind of font weirdness on Linux. I'm using Fedora 31. When I print to PDF or use Export to make a PDF, some of the text is garbled. It's garbled in a different way from what yours looks like, but the underlying cause might be related. I've attached an example notebook, the result of Export, and the result of printing to PDF.

On one machine, the problem went away after I removed the Adobe Source Code Pro fonts package. But removing those fonts didn't fix the problem on two other machines.

Saving as pdf works perfectly for me (using Kubuntu 18.04):

In[3]:= $Version

Out[3]= "12.0.0 for Linux x86 (64-bit) (April 7, 2019)"
POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract