1 Reply Latest reply on Jan 16, 2017 4:49 AM by Loic.Aigon

    Primary Text Frame/Smart Text reflow not cooperating with my javascript

    Colin Flashman Adobe Community Professional

      Hello all.

       

      I've created a javascript that makes a quick manifest spreadsheet for me because I'm sick of creating them out of Excel.

       

      It effectively creates a new document that contains a primary text frame and creates a table based on two fields from the UI, none of which are relevant to the issue. It then opens an export PDF location dialog box, and when a folder is chosen, it bases the filename on input from the UI at the start of the script, and then closes the ID file without saving.

       

      The script works fine... provided that the manifest is one page long. However, there will be instances where the manifest may be several pages long.

       

      In instances where the table is longer than one page, the script runs fine until the prompt asks to save the PDF, the ID file in the background is one page long and has an overset text icon. If I remove the export and file close lines, the script successfully generates a multi-page document.

       

      I've tried using $.sleep between the last text formatting function and the export instruction, but it just idles for a the appropriate time and the outcome is the same... 1 page with overset text. I've tried making an if overset text... $.sleep, but again the outcome is the same.

       

      The script is long and boring but for those interested, it can be found here: https://dl.dropboxusercontent.com/u/55743036/HPSmanifest.jsx

       

      Is there some kind of bug here, or am I missing something? I read the following thread How do I "shift-place" text?  and I'm sure my answer lies in here, but the primary text frame/smart text reflow solution should work... right?