Copy link to clipboard
Copied
Hi everyone!
I'm not too hopeful about this one, but is there a way to retrieve a list of installed fonts available for use in Acrobat via JavaScript? Something similar to app.fonts in Extendscript?
I know this can probably be done with a Java library like PDFBox, but I wanted to make sure there's no way to achieve this with JavaScript before I go down that wormhole. I realize this might not be possible though.
Any push in the right direction is greatly appreciated. Thanks so much!
No, the installed fonts are not available to the Acrobat JavaScript model. This would be a great feature though.
You can use any installed font if you already know the language independent name. The process for gettting the name is to set it in a form field, then acquire it with JavaScript in the console. A bit laborious for creating a large list, but enough to build a small one.
I don't know if there is a relationship between the HTML font names and the ones used in Acrobat, but if there is
...Copy link to clipboard
Copied
Want you a list of the installed fonts on the system?
Copy link to clipboard
Copied
Yes, correct.
Copy link to clipboard
Copied
Not possible with Acrobat Javascript.
Copy link to clipboard
Copied
No, the installed fonts are not available to the Acrobat JavaScript model. This would be a great feature though.
You can use any installed font if you already know the language independent name. The process for gettting the name is to set it in a form field, then acquire it with JavaScript in the console. A bit laborious for creating a large list, but enough to build a small one.
I don't know if there is a relationship between the HTML font names and the ones used in Acrobat, but if there is one, then you could just create an array of names in a browser console and copy it into an Acrobat script.
Copy link to clipboard
Copied
Perfect, I actually think this workaround could work in my case. Thank you so much—appreciate the help!
Copy link to clipboard
Copied
If you want this to be done purely in the Acrobat environment, then you'll need to use a plug-in.