Skip to main content
Known Participant
October 23, 2020
Question

Finding fonts status, and Link (Placed item) status in Illustrator document

  • October 23, 2020
  • 2 replies
  • 332 views

Hi

I am trying to get the below details as report from Illustrator, but these are all working in InDesign application, but I am unable to get the below details in illustrator. Can you please check and help me out from this?

1. List of fonts and fonts status (missing, installed, etc.) in particular document. Below coding is for InDesign.

var myDoc = app.activeDocument;

var fontList = myDoc.fonts;

for(var i=0; i<fontList.length;i++) {

alert(fontList[i].name+" Status is "+fontList[i].status);
}

2. Images (PlaceItems [ai,psd,tif,jpg,PDF]) status (linked, missing, etc), and its scaling details (X and Y).

This topic has been closed for replies.

2 replies

Charu Rajput
Community Expert
Community Expert
October 23, 2020

Hi,

You will get list of fonts in Illustrator using

 

app.textFonts

 

Following snippet will give list all list of fonts

 

var fontList = app.textFonts;

for (var i = 0; i < fontList.length; i++) {
    $.writeln(fontList[i].name);
}

 

For placedItems in Illustrator (Links in Indesign), you can access placedItmes as

var placedItems = app.activeDocument.placedItems;

 

This will return all placedItems exists in the document. You can read about this more from the following link

https://illustrator-scripting-guide.readthedocs.io/jsobjref/PlacedItem/?highlight=placedItems

 

 

Best regards
AsuvathAuthor
Known Participant
October 24, 2020
Hi,

Thanks for reply.

Actually I need the font report and it's status (missing status) for
active document only, not for whole illustrator fonts. The code
app.textFonts give whole illustrator fonts. I need only the fonts list that
shows as in find font menu in active document alone. Like how will get it
from InDesign.


Regarding the links, I can get links name. But I need the details for how
do I get missing links report and scaling details for all the images which
are all in the active document.

Can you please check and help me?
CarlosCanto
Community Expert
Community Expert
October 23, 2020

InDesign Script won't work in Illustrator, both applications have their own scripting api. They're not compatible with each other.

AsuvathAuthor
Known Participant
October 24, 2020
Thanks for the replies. Actually, I too know that, if you know about
equivalent illustrator coding, then can you please guide me? I am
struggling to where am I get that script API. It's more useful if you share
the link for illustrator script API.

Thanks
Charu Rajput
Community Expert
Community Expert
October 24, 2020

Hi,

Below is the link where you have read about script API. 

https://illustrator-scripting-guide.readthedocs.io/

Best regards