Print method maxing out at 50 pages

When the following method is executed from within Developer it works fine, however when used with Servoy Client the print job fails after about 50 pages.

controller.recordIndex = 1;
for ( var i = 1 ; i <= controller.getMaxRecordIndex() ; i++ )
{ 
	controller.recordIndex = i;
	forms.Page1.controller.print(true,false);
	if(utils.stringWordCount(attachment) > 0)
	{
	forms.Page2.controller.print(true,false);
	}
} 
controller.recordIndex = 1;
plugins.dialogs.showInfoDialog('Print Status','Print job completed!','OK');

Does anyone have any idea how to resolve this?

Dean

I have a few questions:

  1. Does it fail with an error or do you only see 50 pages and that’s all?
  2. Is the dialog shown after the print fails?
  3. Does it work with 3.5?

If it fails simply by not printing more than 50 pages and the dialog is not shown after it fails, I will need to see the contents of servoy_log.txt after it failed.