Identify MathType eps

Viewing 4 reply threads
  • Author
    Posts
    • #96246
      Bala S
      Participant

      I have tried a script to identify MathType eps from an InDesign document and want to rename. By using this function, I could find all eps (even illustrator eps file), but I need to find MathType eps alone. Can anyone help me?

      function imgRenameProcess()
      {
      var myDoc=app.activeDocument;
      var myLink = myDoc.links;
      for(var i=0;i<myLink.length;i++)
      {
      count=count+1;
      var imgname=myLink[i].name;
      var imgExt = imgname.substr(imgname.lastIndexOf(“.”) ,imgname.length);

      if (imgExt == “.eps”)
      {

      var myLinkFile = File(myLink[i].filePath);
      var newname= myUsrInput + count+imgExt;
      myLinkFile.rename(newname);
      myLink[i].relink(myLinkFile);
      myLink[i].update();
      }
      }

      }

    • #96247
      Mike Dean
      Member

      Our MathType EPS files have the creator application name stored in the XMP metadata (we’re on MathType 6.9b), and it looks like you can check the XMP data from within InDesign.

      So, from within your loop, you should be able to check the creator application for each link using:
      myLink[i].linkXmp.creator;

      If it’s a MathType EPS, the creator property should be “MathType” (at least, that’s what it’s returning for me).

    • #96249
      Bala S
      Participant

      Hi Mike Dean,

      Thanks for your info. However unfortunately I have Math Type Version 6.7a and I am getting the error “No Metadata information available”.

      Is there any other way to find out in this version?

    • #96250
      Mike Dean
      Member

      Hmm, the only other thing I can think of is to read the contents of EPS file (the metadata should be plain text). If you open a MathType file in Notepad, do you see a line like this near the top?
      %%Creator: MathType

      If that’s present in a MathType 6.7a file, then you should be able to read the EPS file with a script as discussed in this Adobe forum thread:
      https://forums.adobe.com/thread/472724

      Hope that helps!

    • #96334
      Bala S
      Participant

      Hi Mike Dean,

      Thank you so much for your guidance to resolve my issues. Now everything works fine!

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
>