we have a problem with the indesign smart textreflow.
We are trying to fill different InDesign templates by a script and because we don't know how many pages the result will have, we are using smart textreflow to add additional pages automatically as needed.
If we open the document visible for the user and fill it with data, everything works as expected.
The problem is, if we open the the document invisible/not visible (or InDesign is minimized while filling) the smart textreflow doesn't add the needed pages and the content will overflow.
doc = gApp.Open(sNewPath, true); // works fine
doc = gApp.Open(sNewPath, false); // our problematic case
While the example template is rather easy to fill we have many different templates that work completely different (sry can't show these), so we don't really want to add pages "manually via script".
So if we open the example template and fill it with data the resulting .pdf will have max 2 pages and the remaining data will be cut off by an overflow.
Because of the higher speed when invisible we would prefer to run this script without the document to be visible but are forced to display it at the moment.
Does anyone have an idea how to solve the problem so we can use smart textreflow with the document beeing invisible?
A desperate programmer