Skip to main content
Mahesh_JW
Inspiring
March 25, 2013
Question

how to find pointSize below 8

  • March 25, 2013
  • 1 reply
  • 752 views

Hi All,

I want to generate a report with page and font name if the InDesign document contains font size below 8 points.

plz reply ASAP.

Regards

Mahesh

This topic has been closed for replies.

1 reply

Jongware
Community Expert
Community Expert
March 25, 2013

What do you have, so far? Or do you need someone to write a custom script for you from scratch?

Mahesh_JW
Mahesh_JWAuthor
Inspiring
March 26, 2013

Hi,

Thanks for your reply.

This is what my code, but is this good idea or something in efficient?

for(var num=7.9;num>=6;num = num - 0.1){

          app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

          app.findTextPreferences.pointSize = num;

          var result = app.activeDocument.findText();

          if(result.length>0){

                    for(var a=0;a<result.length;a++){

                              result.select();

                              //report page, font name

                    }

          }

}

Regards

Mahesh

Jump_Over
Legend
March 26, 2013

Hi,

It should work basically however manually scaled text will be excluded (i.e 6.5435 pt)

And I suggest to change last line:

      result.select();

to:

      result.showText();

      alert(a);

to see effect

Jarek