# Receiving a fax: nfxrecv

Demonstrates receiving a fax. Use nfxrecv to receive a fax from a fax terminal, or from the nfxsend demonstration program.

#### Usage

nfxrecv [options] filename1 [filename2 [ ... ]]

options are:

Option | Description | Default
--- | --- | ---
-b n | Specifies the AG or CG board number n. | 0
-q | Specifies that the board is a QX 2000 board. | AG/CG board
-s n:m | Specifies the stream and timeslot. | 0:0
-r resolution | Specifies the resolution (low, high, or superhigh). | low
-e encoding | Specifies the encoding (1D, 2D, MMR, or TIFF_S). | 1D
-c mode | Specifies the conversion mode: y = yes (NFX_OTF_ALWAYS) m = maybe (NFX_OTF_ONLY_IF_FAIL) n = no (NFX_OTF_NEVER) | m
-p protocol | Specifies the protocol (TCP name). | nocc
-w pagewidth | Specifies the page width (A4, B4, A3). | A4
-E | Specifies the using ECM mode is used when encoding is 1D or 2D. | Do not use ECM.
-v | Specifies verbose reporting of event information. | Non-verbose reporting.

#### Description

nfxrecv performs the following tasks:

Task | Description
1 | nfxrecv receives a fax using NaturalFax and Natural Access functions.
2 | It initializes the Natural Access environment and opens the ADI service with the specified board, stream, and timeslot.
3 | nfxrecv then creates the fax document queue and enqueues the specified files.
4 | It answers the call, sets the receive parameters, and receives the fax. Specifying TIFF-S encoding causes the calling application to receive a file using TIFF-S attributes of 1D encoding, LOW resolution, and A4 page width. TIFF-S encoding overrides any values specified on the command line.
5 | While waiting for the NFXEVN_SESSION_DONE event, nfxrecv monitors all events and takes appropriate action in case the call is disconnected or a board error occurs.
6 | After it receives the fax, nfxrecv releases the call, destroys the document queue and the event queue, and closes the context.