1. /*
  2. Version 1.2 (Updated for Acrobat X)
  3. Folder Javascript Created by Joel Geraci - Acrobat Technical Evangelist - geraci@adobe.com.
  4. 
  5. */
  6. if (app.viewerType != "Reader")
  7. {
  8. app.addMenuItem({
  9. cName: "ADBE_fixFields",
  10. cUser: 'Fix Field Appearances',
  11. cParent: 'Edit',
  12. cExec:"fixFields()",
  13. cEnable: "event.rc = (this.numFields > 0) && (this.info.Producer.substr(0,3) == 'Mac');"
  14. });
  15. 
  16. function fixFields()
  17. {
  18. nFields = this.numFields;
  19. var t = app.thermometer;
  20. t.duration = nFields;
  21. t.begin();
  22. for ( var i=0; i< nFields; i++ )
  23. {
  24. var f = this.getField( this.getNthFieldName(i) );
  25. if (f.type == "text")
  26. {
  27. f.multiline = !f.multiline;
  28. f.multiline = !f.multiline;
  29. }
  30. t.value = i;
  31. }
  32. t.end();
  33. this.info.Producer = "Adobe Acrobat "+app.viewerVersion
  34. }
  35. }
  36.