1 Reply Latest reply on Nov 14, 2013 10:32 AM by try67

    Unable to format a line break in email client from Reader

    prodeditor Level 1

      I'm running both Acrobat Pro X and Acrobat Reader XI under OS 10.7.5.

       

      I have a javascript that formats and sends email that works properly in Pro:


      function formatEmail()

      {

       

      var mailTo = this.getField("emailAddress").value;

       

      mailTo.length

       

      app.mailMsg({bUI: true,

       

      cTo: mailTo,

       

      cSubject: quizName,

       

      cMsg: "Student Name: " + this.getField("Name").value  + "<br/>"

      + "Date: \n " +  this.getField("Date").value + "<br/>"

      + "Quiz Score: " + this.getField("Name").value+ " answered " + correctCount + " questions correctly."  + "<br/>"

      + msgBodyResults  + "<br/>  "

      + "Write-in Answers:"+ "<br/>"

      + "Question #9: " + this.getField("Text09    ").value + "<br/>"

      + "Question #10: " + this.getField("Text10").value + "<br/>"

      });

      }


      The usual javascript command for a new line "\n" simply does not work.  But the html command does.  The script launches MS Outlook for Mac 14.3.8 and enters text in the the Compose Email fields with the correct line breaks:

       

      Student Name: Name

       

      Date: Date

       

      Quiz Score: Name answered 8 questions correctly.

       
      Question #1.  Skill: Key Ideas and Details.  Student Answer: A (correct)

       

      Question #2.  Skill: Vocabulary/Context Clues.  Student Answer: C (correct)

       

      Question #3.  Skill: Literary Device.  Student Answer: D (correct)

       

      Question #4.  Skill: Drawing Conclusions.  Student Answer: C (correct)

       

      Question #5.  Skill: Text Evidence.  Student Answer: D (correct)

       

      Question #6.  Skill: Text Features.  Student Answer: A (correct)

       

      Question #7.  Skill: Text Evidence.  Student Answer: C (correct)

       

      Question #8.  Skill: Key Ideas and Details.  Student Answer: C (correct)

       


      Write-in Answers:
      Question #9: This is a a sample

       

      The problem is that this same script executed in Reader XI will not format a line break at all in the same email client. Not with \n or <br>. The output is just one big block of text similar to this:

       

      Student Name: Name <br/>Date: Date <br/>Quiz Score: Name answered 8 questions correctly. <br/>Question #1.  Skill: Key Ideas and Details.  Student Answer: A (correct) <br/>Question #2.  Skill: Vocabulary/Context Clues.  Student Answer: C (correct) <br/><Question #3.  Skill: Literary Device.  Student Answer: D (correct) <br/>Question #4.  Skill: Drawing Conclusions.  Student Answer: C (correct) <br/>Question #5.  Skill: Text Evidence.  Student Answer: D (correct) <br/>Question #6.  Skill: Text Features.  Student Answer: A (correct) <br/>Question #7.  Skill: Text Evidence.  Student Answer: C (correct) <br/>Question #8.  Skill: Ket Ideas and Details.  Student Answer: C (correct) <<br/> Write-in Answers: <br/> Question #9: This ia a sample <br/> Question #10: <br/>

       

      The only other variable here is that the pdf executed by Reader is a Reader Extended PDF.

       

      Does anyone have the solution? (Or an explanation?) Thanks ....