Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are five types of effects: real size, fit to paper, normal size, change paper and fit to paper and change.

Real size
 The size of the content does not change

Fit to paper 
 The content will be resized to fit the new paper size.

Normal size 
 The size of the content will be adjusted according to the selected scale in percentage. Subsequently, the new position of the content on the page can be determined.

Change paper
 Sets the paper size, you can also specify a new paper orientation. Subsequently, the new position of the content on the page can be determined.

Fit to paper and change
 Combine "Fit To Paper" and "Change paper".

For simpler settings, you can use the appropriate methods described below.

Info

Print and export has separate effect settings.

Table of Contents

The effect parameter object

Methods:

NameDescriptionXFRX
versionSetRealSize

This method set real size.

22.0SetFitToPaper

This method set color.

Parameters:

m.liPaperIndexFit – Paper size index with content size adjustment.

22.0SetNormalSize

This method set font.

Parameters:

m.lnSize – new contents's size in percent

m.lcRelativePos – define new position of content, values can be: "left", "center", "right", "top", "middle", "bottom" or their combination sepparated by comma.

22.0SetChangePaper

This method set horizontal and vertical aligment.

Parameters:

m.liPaperIndexChange – Paper size index for paper's change.

m.luOrientaion  – orientation;   values: "portrait" (0), "landscape" (1), "reverse" (2), "nochange" (3)

m.lcRelativePos – define new position of content, values can be: "left", "center", "right", "top", "middle", "bottom" or their combination sepparated by comma.

22.0SetFindAndChange

This method set text orientation.

Parameters:

m.liPaperIndexFit – Paper size index with content size adjustment.

m.liPaperIndexChange – Paper size index for paper's change.

m.luOrientaion  – orientation;   values: "portrait" (0), "landscape" (1), "reverse" (2), "nochange" (3)

m.lcRelativePos – define new position of content, values can be: "left", "center", "right", "top", "middle", "bottom" or their combination sepparated by comma.

22.0

Properties:

NameType DescriptionXFRX
versioniHAlignnumberHorizontal alignment. Values are: 0 - left,  1 - center, 2 - right.22.0iVAlignnumberVertical alignment. Values are:  0 - top, 1 - middle, 2 - bottom.22.0iOrientationnumberPaper orientation. Values are: 0 - portrait, 1 - landscape, 2 - reverse, 3 - nochange22.0iPaperIndexChangenumberPaper size index for paper's change.22.0iPaperIndexFitnumber

Paper size index with content size adjustment.

22.0lAutoSizebooleanAuto size flag. If value is true, then content will be calculated by page size.22.0nSizenumberNew content size in percents.22.0lShowPreviewnumberShow preview of effect.22.0iTypenumberType effect: 0 - real size, 1 - fit to paper, 2 - normal size, 3 - change paper, 4 - fit and change paper22.0

See to EFFECT Object description.

Effect examples

Code Block
USE invoices 
ORDER customer 
LOCAL m.loSession, m.lnRetval, m.loXFF, m.loPreview, m.loScripts 
m.loSession=EVALUATE([xfrx("XFRX#LISTENER")]) 
m.lnRetVal = m.loSession.SetParams("",,,,,,"XFF") && no name = just in memory 
IF m.lnRetVal = 0 
   REPORT FORM invoices OBJECT m.loSession 
   m.loXFF = m.loSession.oxfDocument 
   * 
   * initialize the previewer 
   * SET CLASSLIB TO xfrxlib ADDITIVE 
   m.loPreview = CREATEOBJECT("frmMPPreviewer") 
   m.loPreview.windowType = 0 
   m.loPreview.iBook = 0 

   WITH loPreview.oExportOptions
   .oEffect.lShowPreview=.T.
   .oEffect.SetFitToPaper(11) && fit to paper to A5
   ENDWITH

   m.loPreview.PreviewXFF(loXFF) 
   m.loPreview.show(1) 

ENDIF