I'm unable to use a LaTeX font (e.g., Augie) for text fields in a PDF form generated with eforms. I'm using MikTeX 2.9 on Windows 10. Acrobat Reader is choosing another font to display in its place (looks like MyriadPro-Regular, which seems to be what Adobe Reader substitutes for missing fonts):
The LaTeX font is fully embedded as "Augie" according to Adobe Reader's Properties:
Also, according to pdffonts:
pdffonts embedViaPS.pdf
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
[none] Type 3 Custom yes no no 27 0
Augie Type 1C WinAnsi yes no no 24 0
ZapfDingbats Type 1C Custom yes no yes 13 0
Helvetica Type 1C WinAnsi yes no no 17 0
It's my understanding that for a font to be used in a field, it must be fully embedded (as opposed to an embedded subset). I am achieving this using -j0 on dvips and a customized ps2pdf by way of GhostScript. Here's the (redacted) output from TeXstudio showing all the commands:
latex.exe -src -interaction=nonstopmode embedViaPS.tex
dvips.exe -j0 -o embedViaPS.ps embedViaPS.dvi
This is dvips(k) 5.998 Copyright 2018 Radical Eye Software (www.radicaleye.com)
' TeX output 2018.08.31:1642' -> embedViaPS.ps
<C:\MikTeXPortable\texmfs/data\fonts\pk\ljfour\jknappen\ec\dpi600\ecrm1000.pk>
<C:/MikTeXPortable/texmfs/install/dvips/base/tex.pro>
<C:/MikTeXPortable/texmfs/install/fonts/enc/dvips/base/8r.enc>
<C:/MikTeXPortable/texmfs/install/dvips/base/texps.pro>
<C:/MikTeXPortable/texmfs/install/dvips/base/special.pro>.
<C:/MikTeXPortable/texmfs/install/fonts/type1/emerald/faumw.pfb>
[1]
Process exited normally
"C:\Program Files\gs\gs9.10\bin\gswin64c.exe" -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dEmbedAllFonts=true -dSubsetFonts=false -sOutputFile="C:\hiddenpath\embedViaPS.pdf" -f "C:\hiddenpath\embedViaPS.ps"
Process exited normally
Process started: "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" "C:\hiddenpath\embedViaPS.pdf"
Process exited normally
I've done some debugging using the MWE below:
\documentclass{article}
\usepackage[dvips]{eforms}
\usepackage{emerald}
\usepackage[T1]{fontenc}
\begin{document}
\everyTextField{
\BC{1 0 0} % border color
\BG{.941 1 .941} % background color
\textColor{0 0 1} % is black
\AA{\AAFormat{console.println("Font set to: '" + event.target.textFont + "', trying to set it to: '" + event.target.value + "'"); event.target.textFont = event.target.value;}}
\textSize{10}
\Ff{\FfDoNotScroll}
}
% Content containing form fields, such as...
{\ECFAugie
Your name: }
\textField[\textFont{Augie}]{name}{1.5in}{12bp}
\end{document}
Upon opening in Adobe Reader DC the PDF generated from this document, I see in the JavaScript console (enabled in Preferences) the following output:
Font set to: 'Augie', trying to set it to: ''
I'm using Augie as the name, since that is what's showing up in pdffonts and the properties of Adobe Reader. However, even though I have initialized the \textField with that font (from the output), it's not displaying that font in Adobe Reader DC. Furthermore, if I try to reset it to Augie using the form field (typing Augie and pressing enter), I get the following:
Font set to: 'Augie', trying to set it to: 'Augie'
InvalidSetError: Set not possible, invalid or unknown.
Field.textFont:2:Field name:Format
The script allows me to type a font name into the field and when I press enter, it attempts to set the font of that field using JavaScript. I'm able to set the field to other values, e.g., Helv, Helvetica, Another, Bauhaus93, etc. (the last two are installed on my Windows machine as TrueType fonts).
I don't want (or rather can't) use XeTeX as it seems there's no way to fully embed fonts into the PDF.
- Is there perhaps another name for the font than
Augie? - Is there perhaps some other detail for the font that's not right, e.g. it's not editable according to its
fsType/FSType?Can I even control that in LaTeX?Edit As a test, I hacked the Augie font (faumw.pfb) using FontForge and set its fsType to 8 - editable embedding, but nothing changed. - I have not yet tried to install a TrueType (OpenType) font in MikTeX because it's a long process, but perhaps that will yield a better result?





eformsto do that. – Fuhrmanator Sep 03 '18 at 18:23pdflatex). I did it with a TTF but as yet have not tried Type1... As much as I'd like this to be 100% LaTeX solution, I don't think it's possible with existing tools.eFormsdoesn't appear to support embedding fonts into the Acroform of a PDF. – Fuhrmanator Sep 05 '18 at 21:30