Jump to content
AK_CCM

afpub: PDF export issue with font encoding

Recommended Posts

Hello,

if I export a file with text in a field (Arial Bold) as PDF the text is shown like character salad. If I use the Microsoft PDF printer or change the text to regular the exported PDF is showing correct.

What did I wrong - could anyone help me please?

Best regards,

Andreas

2019-07-12-afpub-textfeld-arial-bold-24pt.png

2019-07-12-afpub-textfeld-arial-bold-24pt-pdf.png

2019-07-12-afpub-textfeld-arial-regular-24pt.png

2019-07-12-afpub-textfeld-arial-bold-24pt-print-ms-pdf.png

test.afpub

Share this post


Link to post
Share on other sites

I exported the test file to PDF and it looks fine.

The character salad looks like font cache corruption.
Note how the Arial-BoldMT Encoding says "Custom" - mine says "Identity-H" like the others.
That could be another indication of font cache corruption.

Does the Arial-Bold look bad in other exported PDF documents?

Share this post


Link to post
Share on other sites

There are tutorials out there on clearing the Windows font cache.
If you are using a font manager it may also have its own font cache.
And APub has its own font cache - and I have not found a way to manually delete it.
Shutting-down APub and then installing/un-installing some fonts seems to trigger it to rebuild upon restarting APub.
That may work.

Did you test Arial-Bold export to PDF in another APub document?
It could be just the APub cache.
You may be able to narrow it down.

I would test Arial-Bold in Export to PDF from LibreOffice or other application.
If it works there it could just be the APub font cache.

Share this post


Link to post
Share on other sites

I'm using no extra font manager.

I cleared the Windows font cache - the same before.

After that I downloaded the Arial fonts from the Microsoft TrueType core fonts at Sourceforge, unzipped the archives and copied the .ttf files into the WINDOWS/Fonts directory. After restart the Publisher the exported PDF is showing well. I think the fonts were destroyed.

Thanks for your helping hints

Share this post


Link to post
Share on other sites
5 hours ago, AK_CCM said:

After that I downloaded the Arial fonts from the Microsoft TrueType core fonts at Sourceforge, unzipped the archives and copied the .ttf files into the WINDOWS/Fonts directory.

Ugh. Those fonts are really old. And bad.
Looks like you are on Windows 10.
I can send you the most current Win10  fonts via PM if you want.

Glad you got it working.

Share this post


Link to post
Share on other sites

Yes, I'm using Windows 10.

It would be great if you could send me the most current fonts via PM.

Thanks in advance

Share this post


Link to post
Share on other sites
Posted (edited)

Curious. I extractet the fonts directory from the install.wim of the installation iso. Then I copied the font files into the C:\WINDOWS\Fonts directory of my system. And the error is there again. Tomorrow I'll try to solve the error.

Update: I cleaned the font cache (services.msc contains no entry, so I had to stop the service with the command "net stop FontCache"). Then I added two .reg files to the Windows registry (please have a look to the quote below). After I restarted the computer all is working fine.

Quote

Windows 10/8.1 Default Font Archives

If you don’t have a Windows 10 (Windows 8.1) installation image, you can copy the directory with the original fonts from another computer running the same OS version or use ready font archives that can be downloaded from the links below:

Download and unzip the archive for your Windows version and copy its contents to the C:\Windows\Fonts folder with the replacement of the files.

Also download and apply (double click) the following reg files from the archive win10-default-fonts-reg.zip.

The first file (win_10_fonts.reg) contains a list of standard fonts registered in the registry (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts).

The second file (win_10_FontSubstitutes.reg) contains font association settings (HKLM \SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes).

Restart your computer, the problem with the fonts should be gone!

Source: http://woshub.com/how-to-restore-default-fonts-in-windows-8-1/

I hope, that this solution could help any other Windows 10 users to solve their corrupted standard fonts.

Edited by AK_CCM
Update

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×