FitToPaperSize Method

Transform content to new paper size.


Object.FitToPaperSize(liPaperSizeIndex [, lnPageWidth [, lnPageHeight  
                      [, lcPageScope [, laPS ]]]])

Parameters

liPaperSizeIndex
   Paper size index.

lnPageWidth
  Paper width in FRU.

tlnPageHeight
  Paper length in FRU.

lcPageScope
 Contains the pages numbers separated by commas and ranges separated by dashes, e.g.: “1,2,5-6,8,20-30” to apply the transformation to.

laPS
 A array  contains papers size. If the parameter is empty, then XFRX use internal list of paper size.

Return values

.F. ... paper size was not changed
.T. ... paper size was changed

Remarks

Applies To: XFRX#DRAW

XFRX version: 22.0

See also: ChangePaperSizeZoomContent

Examples

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
 
   m.loXFF.FitToPaperSize(11) && fit to paper to A5
   m.loXFF.SavePicture("somepage.jpeg", "jpg", 1, 1) && save to file

   RELEASE m.loXFF 
ENDIF
RELEASE m.loSession