Preflight for text fitting and formatting

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 18:44

The preflight test for text fitting and formatting includes:

Fitting and formatting

Description

Code

If all linked stories do fit

This test will fail if any linked story does not fit in the assigned space.

1

If all local frames do fit

This test will fail if any local text does not fit in the assigned space.

128

If there are no formatting error in any text

This test will fail if in any text there are justification errors.

2048

If there are no overfull lines in any text

This test will fail if in any text there are overfull lines.

4096

If there are non-fitting paragraphs in any text

This test will fail if in any text there are paragraph out of specified number of lines

8192

To perform such a test from scripting, assuming the workstate id for articles is 123, and workstate id for images is 456, the script should look like:

Relaxed test (can proceed with errors)

dim test = 1+128+2048+4096+8192

Page.PageTest(2, test, 123, 456, False)

Strict test (cannot proceed with errors)

dim test = 1+128+2048+4096+8192

Page.PageTest(1, test, 123, 456, False)

Silent test (custom handler for errors)

dim test = 1+128+2048+4096+8192

if Page.PageTest(0, test, 123, 456, False)=0 then

  'here put the commands if there are no errors

else

  'here put the actions if there are errors

end if