Product
SOCKETWorx (web site)
Applies to
Datasheet and report PDFs and spreadsheets produced from templates
Typical font
Arial Narrow (also applies to any font not installed on the server)
Who
Server administrator

Symptom

  • Text in a datasheet PDF is wider than in Excel and is cut off in narrow cells.
  • In the PDF, File → Properties → Fonts lists ArialMT / Arial-BoldMT instead of the template's font (for example ArialNarrow / ArialNarrow-Bold).
  • The SOCKETWorx log may show: Font 'Arial Narrow' is not available for spreadsheets and PDFs on this server; 'Arial' is used instead.

Cause

SOCKETWorx produces PDFs on the web server and can only use fonts the server has. Some fonts used in templates, such as Arial Narrow, come with Microsoft Office rather than Windows, so a web server usually doesn't have them. When a font is missing, Arial is used in its place.

Resolution

Look in the SOCKETWorx site folder (the IIS site's physical path):

  • It contains a Fonts folder with a README.rtf: use Option A.
  • No Fonts folder: use Option B, or update SOCKETWorx and use Option A.

Option A: Add the font to the SOCKETWorx Fonts folder (recommended)

  1. Get the font files. For Arial Narrow these are ARIALN.TTF, ARIALNB.TTF, ARIALNI.TTF and ARIALNBI.TTF. Copy them from a PC that has Microsoft Office, using a command prompt (Explorer's Fonts window doesn't copy font files properly):
    copy C:\Windows\Fonts\ARIALN*.TTF C:\Temp\ArialNarrow\Copy
  2. Copy the files into the site's Fonts folder on the server, next to README.rtf. For example:
    Copy-Item C:\Temp\ArialNarrow\ARIALN*.TTF "C:\inetpub\SOCKETWorx\Fonts\"Copy
    Replace the path with your site's folder.
  3. Recycle the SOCKETWorx application pool (IIS Manager → Application Pools → select the pool → Recycle).
ImportantKeep a copy of the font files. Replacing the whole site folder during an update removes them, and they need copying back. Step 4 below avoids that.

Option A, step 4 (recommended): keep the fonts outside the site folder

A folder outside the site folder is not touched by an update, so the fonts stay in place. Tell SOCKETWorx where it is with a small settings file:

  1. Create the folder, for example D:\SOCKETWorxFonts, and copy the font files into it instead of into the site's Fonts folder. The application pool identity needs Read access to it.
  2. Create appsettings.Production.json in the SOCKETWorx site folder, next to appsettings.json, if it does not exist yet. It is not one of the files an update replaces, so what you put in it survives updates. Put this in it, with your folder (JSON needs the backslashes doubled):
    {
      "GemBox": {
        "FontsFolder": "D:\\SOCKETWorxFonts"
      }
    }
    If the file already exists, add the "GemBox" section to it rather than replacing the file.
  3. Recycle the SOCKETWorx application pool. The log then shows Fonts for spreadsheets and PDFs: installed Windows fonts plus N font file(s) in D:\SOCKETWorxFonts.
Do not put the setting in appsettings.jsonThat file is replaced by every update, so the setting would be lost and PDFs would go back to Arial. The site reads appsettings.Production.json when it runs as Production, which is the default under IIS.

Option B: Install the font in Windows for all users

Run in a PowerShell window opened as Administrator on the web server, from the folder holding the font files.

  1. Copy the files into the Windows Fonts folder:
    Copy-Item .\ARIALN*.TTF C:\Windows\Fonts\ -ForceCopy
  2. Register them for the machine:
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Arial Narrow (TrueType)" /t REG_SZ /d ARIALN.TTF /f
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Arial Narrow Bold (TrueType)" /t REG_SZ /d ARIALNB.TTF /f
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Arial Narrow Italic (TrueType)" /t REG_SZ /d ARIALNI.TTF /f
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Arial Narrow Bold Italic (TrueType)" /t REG_SZ /d ARIALNBI.TTF /fCopy
  3. Check both.Each command must show four items:
    dir C:\Windows\Fonts\ARIALN*.TTFCopy
    reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /f "Arial Narrow"Copy
  4. Recycle the SOCKETWorx application pool.
ImportantDon't install the font by double-clicking it and choosing Install. That installs it for the current user only, and the web site can't use it, even though the Fonts window in Explorer then lists it. Use the dir command above to check, not Explorer.

Verify

Download a datasheet PDF again and open File → Properties → Fonts.

Resolved when the list shows the template's fontfor example ArialNarrow and ArialNarrow-Bold ("Embedded Subset").

If PDFs still use Arial

Datasheet PDFs are produced by background jobs. Any SOCKETWorx instance connected to the same database can run them, including a test server or a developer PC. Open https://<your site>/hangfire/servers: every server listed must belong to the web server where you added the font. Shut down any other instance, or add the font there as well.

Notes

  • Licensing: fonts are licensed software. Arial Narrow is licensed with Microsoft Office; confirm your licensing covers using a font on the server before copying it there.
  • Other fonts: the same steps apply to any font a template uses. Copy that font's .ttf, .otf or .ttc files.
  • Page breaks are a separate topic: if PDF pages split at a different column or row than Excel shows, add manual page breaks to the template in Excel (View → Page Break Preview), then load it with Replace Template File in Datasheet Templates → Modify Properties.

SOCKETWorx tech note, October 2026.