ImageGear Professional DLL v17.1 for Windows Accusoft
IG_REC_converter_pagemargins_set
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Converter Settings Functions > IG_REC_converter_pagemargins_set

Glossary Item Box

Sets left, top, right, and bottom margins of the output page, in TWIPS (1/1400 inch).

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_converter_pagemargins_set(
   LPCSTR lpszFormatName,
   AT_INT nLeft,
   AT_INT nTop,
   AT_INT nRight,
   AT_INT nBottom
);

Arguments:

lpszFormatName Symbolic name of the output format like Converters.Text.Cvs.
nLeft Left margin to be set.
nTop Top margin to be set.
nRight Right margin to be set.
nBottom Bottom margin to be set.

Return Value:

The number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

See IG_REC_converter_pagemargins_usage_set for formats that support this setting. Use IG_REC_converter_pagemargins_is_applicable to know whether the specified format supports margins.

Margins can't be set if the corresponding output format has not been selected with IG_REC_output_format_set at least once. In this case the function returns a non-zero value and appends IGE_REC_CONVERTER_NOT_INITIALIZED error code to the error stack.

Example:

  Copy Code
AT_ERRCOUNT ErrCount = 0;
AT_BOOL bCPMIsApplicable = FALSE;
LPCSTR lpszFormatName = "Converters.Text.Csv";
AT_INT iMLeft = 0;
AT_INT iMTop = 0;
AT_INT iMRight = 100;
AT_INT iMBottom = 200;

ErrCount += IG_REC_output_format_set(lpszFormatName);
ErrCount += IG_REC_converter_pagemargins_is_applicable(lpszFormatName,
    &bCPMIsApplicable);
if(bCPMIsApplicable)
    ErrCount += IG_REC_converter_pagemargins_set(lpszFormatName,
    iMLeft, iMTop, iMRight, iMBottom);
ErrCount += IG_REC_converter_pagemargins_usage_set(lpszFormatName, TRUE);

©2012. Accusoft Corporation. All Rights Reserved.