File Content Extraction 26.1
Filter SDK C Programming Guide

# Macros

Some of the macros are simple while others are complicated. An example of a simple macro is `ParaEnd (pcBuf)` which terminates the current paragraph.

    #define ParaEnd(pcBuf)                                   \
            {                                                \
                *pcBuf++ = KVT_PARA_BREAK;                   \
                 KVT_PUTINT(pcBuf, KVTSIZE_PARA_BREAK);      \
            }

In Filter SDK, this generates an `0x0d`, `0x0a` pair of bytes on a Windows machine. In HTML Export this can generate a `<p style="…">` element, depending on the value of other paragraph attributes.

One of the more complicated macros is `PutPictureEx()`.

    #define PutPictureEx(pcBuf, lpszKey, cx, cy, flags,             \
                 scaleHeight, scaleWidth,                           \
                 cropFromL, cropFromT, cropFromR, cropFromB,        \
                 anchorHorizontal, anchorVertical, offsetX, offsetY)\
              {                                                     \
                 PutPic(pcBuf, lpszKey, cx, cy, flags,              \
                 scaleHeight, scaleWidth,                           \
                 cropFromL, cropFromT, cropFromR, cropFromB,        \
                 anchorHorizontal, anchorVertical, offsetX, offsetY,\
                 180, 0, 180, 0, -1, 0, 0, 0, 0)                    \
              }

You can generate a representation of the token stream by running `filtertest.exe` with the `-d` command-line option. This stream does not include the tokens generated for headers or footers. The `filtertest.exe` is in the directory `install\samples\utf8\bin`, where `install` is the path name of the Filter installation directory.

Copyright 1997-2025 Open Text
Version 26.1 | Last updated January 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 26.1

Topic Title: Macros