2 Replies Latest reply on Sep 21, 2012 5:37 AM by vepoo

    Read imported EPS file




        I'm trying to read some EPS information from InDesgin Script, but I'm finding some differences from EPS Specification (http://partners.adobe.com/public/developer/en/ps/5002.EPSF_Spec.pdf)


        According with EPS Specification, the first four bytes from a EPS file must be C5D0D3C6.


        But if I create a Word document with MathType Equations, and import this document in my InDesign book, and check the embedded files. I found that the four first bytes are D7CDC69A, and all EPS comments (I want read the MathType xml associated with the EPS) are unreadable, but if I look carefully for the file, I see that the information is there.


      There is another type of EPS file that are not on the EPS Specification I linked here? How can I read this file?



        • 1. Re: Read imported EPS file
          Techi Panda Level 2

          Hi vepoo


          i guss your looking for something like this


          function read_basevalue()


          var read_file = myPicFile.open ('r');


          myLine = myPicFile.readln();

          var regular_expression = new RegExp("%%Baseline: ");

          var match_re=myLine.match(regular_expression);

          if (match_re!=null)


          my_base_value = myLine.split(' ')[1];



          while(myPicFile.eof == false);



          • 2. Re: Read imported EPS file
            vepoo Level 1

            Hi Techi Panda!


            I'm already using this code. And it's useful for some cases. But in the case I told, the EPS file store the information of a WMF file. So I cannot read the information with this code!


            There is another way to open this file and read the WMF metadata?