Fitting

Build 1501 on 14/Nov/2017  This topic last edited on: 6/Mar/2017, at 11:00

Introduction

Auto-pagination attempts various methods to fit the content to page. The methods are listed below. The order and priority of methods is actually hard-coded in the scripts.

Fitting of frames to content

The first fitting attempt is the fitting of all frames to content, making more space for potential frames with longer-than-needed content. This happens only if the Scale Frames for Fitting preference is ticked and if the frames have the frame resizing value specified.

Changing of text format

The second fitting attempt is to apply an alternative format, as specified in the object's parameters (if any). This happens if the Use Alternative Formats preference is ticked and if the frames have the alternative formats value specified.

Typographical fitting

The typographical fitting is based on the fitting presets as listed in the element format. Auto-pagination attempts to fit the article elements typographically if the text is not fitting.

Fitting by resizing images

The fitting of body by resizing images is applied on article with images, if the fitting is not prevented in the library object. The fitting applies on the image height, increasing it or reducing it. This happens if the Scale Images for Fitting preference is ticked and if the frames have the image fitting values specified.

Preventing fitting by resizing on specific image

In a library object, right-click on an image placeholder, and then click Image Extra Parameters. In the Vert. Resize drop-down box, select Do Not resize. This prevents the resizing for the fitting purposes of that particular image.

autopage16

Preventing fitting by resizing on all images

On the APM preferences dialog box, untick Scale Images for Fitting.

Fitting by changing proportions

If two, vertically adjacent articles are not fitting, where one is too short and other too long, the auto-pagination will attempt to change their proportion, to make them both fit.

Fitting by adding fillers

If the body element appears too short also after all fitting attempts, the automated page make-up will try to add a filler on the bottom. This happens if the Apply Shape Fillers preference is ticked and if the frames have the image fitting values specified.

Under the hood

The fitting article is attempted by calling the TryFitArticle method that in turn calls the FitCurArtSilent method which is the main caller of the fitting submethods.

1.Can frames be fit to text? This is performed by parsing all the frames of the selected objects and attempting to fit them to content from bottom or from top. The fitting is performed by the FitTB method, independently of the value of SystemUserOptions.AutoPagFit.

2.Photocaptions: if the selected elements contain photocaptions, and if the caption text is too long, and body is too short, but the underset is less of 5 lines, attempt to fit all the photocaptions, one-by-one, by calling the FitEltFrame method that applies the alternative formats, if available. If caption text is too short, then it attempts to fit it independently of the body text status.

3.Headline: if the selected elements contain headlines, and if the SystemUserOptions.AutoPagFit=0, Fred attempts to fit headline by calling the FitElt method. The method applies all the alternative formats, defined in parameters for that frame, one-by-one, and checks the fitting after each change, remembering the best result. If such change doesn't achieve fitting, then the typographical fitting is applied, by calling the FitTxt method.

4.Kicker: the same as headline.

5.Subhead: the same as headline.

6.Body: if there's an image, and it is overlapping body frames, it is used for the fitting purposes.