Last updated: December 2026
By Terminalworks — Remote Desktop Scanning Solutions Since 2014
In remote desktop scanning, compression can happen in four places: inside the scanner, in the TWAIN transfer mode, in the redirection layer before data enters the RDP connection, and in the application that saves the file. Only compression applied on the client side, before the virtual channel, cuts network load. Most applications still receive uncompressed bitmaps through TWAIN native transfer.
This guide follows a scanned page through those stages: the three TWAIN transfer modes and why native transfer turns session host memory into a hidden bottleneck, how lossy compression interacts with deskew and OCR, which codecs suit which documents, how the alternatives to scanner redirection handle compression, and how to find the stage that slows your remote scans. For DPI and color recommendations by document type, see our guide to DPI, compression and file format for remote desktop scanning.
A local scan travels a few centimeters over USB, so compression barely matters. In a remote session the page travels from the scanner on the user's desk to an application on a session host in another building, another country or an Azure region. Four points along that path can compress the image, and four different parties control them: the scanner firmware, the TWAIN driver, the redirection software and the business application.

In our experience supporting thousands of RDS environments, most slow-scan tickets trace back to one misunderstanding: administrators raise the compression in the application's save dialog and expect the scan to move faster. That setting acts on the server, after the full image has already crossed the connection.
| Stage | Runs on | Typical codecs | Effect on RDP traffic | Controlled by |
|---|---|---|---|---|
| 1. Scanner hardware | Scanner, client side | JPEG for color and grayscale | Speeds up the USB hop; crosses RDP compressed only with USB redirection | Driver setting, often "JPEG transfer" |
| 2. TWAIN transfer mode | Wherever the driver runs | Group 4, JPEG, JBIG | Rarely relevant: most applications use uncompressed native transfer | Application developer |
| 3. Redirection layer | Client, before the virtual channel | Lossless (zlib style) or JPEG | Decides how much data crosses the connection | Redirection software |
| 4. Application save | Session host | Group 4, JPEG, JPEG 2000 in PDF or TIFF | None; storage size only | Application or DMS profile |
Direction matters too. The scan travels on the user's upload link, which on home broadband is often a fraction of the download speed. A 50-page color batch at 300 DPI is about 1.3 GB of raw pixels: roughly 11 minutes over a 20 Mbps uplink, versus about 15 seconds at 600 KB per compressed page.
RDP has general-purpose bulk compression that a static virtual channel can opt into with the CHANNEL_OPTION_COMPRESS_RDP flag, and dynamic virtual channels have their own compressed data PDUs. These dictionary compressors target screen and protocol data. They cannot shrink data that is already JPEG or Group 4 encoded, and on raw bitmaps they miss the two-dimensional structure that document codecs exploit. Static virtual channel data also moves in 1,600-byte chunks by default (up to 16,256 bytes if negotiated), so one uncompressed 26 MB color page becomes more than 16,000 PDUs competing with screen updates.
TWAIN defines how a driver (the Data Source) hands an image to an application through transfer mechanisms negotiated with ICAP_XFERMECH. There are three main modes, and they differ in what the application receives.

The application developer picks the mode, usually years before anyone runs the application on a terminal server, and that choice decides whether compression is possible between driver and application.
Native transfer is the default and the simplest to program. On Windows the driver writes a device-independent bitmap (DIB) into one memory block and passes the handle to the application. Compression negotiation through ICAP_COMPRESSION applies to buffered memory and file transfers, so in practice native transfer delivers an uncompressed bitmap. A pattern we see repeatedly is that EMR systems, accounting packages and desktop DMS clients use native transfer because it needs very little code.
The application allocates buffers and the driver fills them strip by strip. In this mode ICAP_COMPRESSION can request CCITT Group 4, JPEG, JBIG and other codecs, although the specification warns applications not to assume a driver can deliver compressed transfers. Production capture software uses it to keep memory flat on fast sheetfed scanners such as the Ricoh (formerly Fujitsu) fi-series, Kodak and Canon imageFORMULA.
The driver writes the image straight to a file, in a format negotiated through ICAP_IMAGEFILEFORMAT. The TWAIN header defines TIFF, JFIF, PNG, PDF, PDF/A, PDF/A-2 and PDF/raster among others; PDF/raster arrived with TWAIN 2.4. Drivers are not required to support file transfer, and many do not.
| Transfer mode | Application receives | Compression to application | Required in drivers | Remote desktop implication |
|---|---|---|---|---|
| Native | One DIB per page in a single memory block | None in practice | Yes | Full-size bitmap in session host memory per page |
| Buffered memory | Strips in application buffers | Optional: Group 4, JPEG, JBIG | Yes | Low memory per page; codec depends on driver |
| Disk file | A file written by the driver | Set by the file format | No | Output format fixed at scan time |
This is why compression for network traffic belongs in the redirection layer. It sits between the driver on the client and the application on the server, so it can compress data in transit and still deliver whatever transfer mode the application requests.
A DIB is the raw pixel grid, with each scan line padded to a 4-byte boundary. At 300 DPI an A4 page is 2,481 by 3,507 pixels: about 1.1 MB in black and white, 8.7 MB in grayscale and 26.1 MB in 24-bit color. At 600 DPI color it is 104 MB. Whatever crossed the network, native transfer rebuilds that full bitmap on the session host.
One of the most common support tickets we receive here is an application that fails mid-batch with an out-of-memory error while the server shows gigabytes of free RAM. The limit belongs to the process. A 32-bit application on 64-bit Windows gets 2 GB of address space by default, or 4 GB if linked as large-address-aware, and each native transfer needs one contiguous block. An application that holds every page until it builds the PDF uses about 1.3 GB after 50 color pages at 300 DPI, and fragmentation can make the next 26 MB allocation fail before the theoretical limit. On a session host, ten users holding such batches tie up about 13 GB.
Lossy compression is not a problem in itself. JPEG at quality 75 to 85 looks clean on most office documents, and OCR copes well at adequate resolution; Tesseract's documentation recommends at least 300 DPI. Trouble starts when a page is compressed lossily more than once, or when the content demands exact pixels.
A color page can pass through three JPEG encoders: the scanner's hardware JPEG transfer, the redirection layer's lossy setting and the application's PDF writer. JPEG works on 8 by 8 pixel blocks. Re-encoding at the same quality on the same block grid adds little damage, but a crop, deskew or rotation between two encodes shifts the grid, and the second encoder treats the first encoder's artifacts as image detail. The result is ringing around characters and softened fine print, which can lower OCR accuracy on small fonts, stamps and handwritten figures.

The practical rule is one low-quality lossy step at most. If the application saves JPEG-compressed PDFs, run the transfer losslessly or at quality 85 or higher, and let the scanner driver deskew and crop before the first lossy encode.
For text documents, the most effective compression decision is the color mode. A 1-bit page is 24 times smaller than 24-bit color, and CCITT Group 4, the standard bitonal codec in TIFF and PDF, is lossless. Group 4 codes the black-white transitions on each line relative to the line above. Transitions per line depend on the text, not the DPI, so compressed size grows roughly in proportion to DPI while the raw bitmap grows with its square: going from 300 to 600 DPI quadruples a color bitmap but roughly doubles a Group 4 file. That makes 400 or 600 DPI black and white affordable for fine print and small barcodes. Let the scanner driver on the client threshold the original sensor data with its adaptive algorithms, rather than converting in the application after a lossy color transfer.
| Codec | Lossless | Color depth | Good fit | Watch out for |
|---|---|---|---|---|
| CCITT Group 4 | Yes | Black and white | Contracts, invoices, forms, check images | Photos, ID cards, colored stamps |
| JBIG2, lossless | Yes | Black and white | Large text archives | Encoders that default to lossy mode |
| JBIG2, lossy pattern matching | No | Black and white | Rarely appropriate for records | Swapped look-alike characters with no visible artifacts |
| JPEG | No | Grayscale, color | ID cards, photos, colored forms | Repeated encoding; small fonts at low quality |
| JPEG 2000 | Either | Grayscale, color | Color archives in PDF/A-2 and later | Not permitted in PDF/A-1 |
| Deflate or zlib | Yes | Any | Lossless transfer of pixel-exact pages | Modest ratios on photos and noisy backgrounds |
The JBIG2 row deserves emphasis. In 2013 researcher David Kriesel showed that Xerox WorkCentre devices using JBIG2 pattern matching replaced digits in scanned pages, turning a 6 into an 8, while the page looked clean. A codec that can silently change an invoice total or a dosage has no place in a default profile for accounting, banking or healthcare. Banking also fixes the format by standard: ANSI X9.100-181 specifies Group 4 bilevel TIFF for check image exchange.
Each alternative makes its own compression decisions, and for some workflows they are good enough. Two questions decide which: where the image gets compressed, and whether the application must drive the scan through TWAIN.

The sections below walk through each branch of that decision.
Opaque low-level USB redirection forwards USB request blocks to the session host, where the scanner's own driver runs. Microsoft describes it as transporting raw device communication without optimizing it, designed for low-latency connections; it has supported RD Session Host with session isolation since Windows Server 2012. Compression is whatever the scanner does in hardware: a model with JPEG transfer sends compressed color data, a model without it sends raw pixels, and every USB transaction is a round trip, so latency hurts as much as bandwidth. It suits one scanner model on a LAN at low volume, if you can maintain that driver on every session host.
A network multifunction device such as a Brother MFC, Epson WorkForce or Canon imageRUNNER compresses in firmware, typically JPEG or a mixed raster "high compression PDF" mode, and delivers a finished file over SMB or email without touching RDP. When DocuWare, M-Files or SharePoint already ingests a watched folder, this is often the most efficient path. It falls short when the application must start the scan, attach the page to the open patient or client record, or set duplex, resolution and color per document.
A phone captures each page as a JPEG. A 12-megapixel photo of an A4 page that fills the frame works out to roughly 340 pixels per inch, but perspective correction, lighting and compression vary from shot to shot. That is fine for occasional receipts and KYC copies uploaded through a web portal, not for 50-page batches or TWAIN applications in a remote session.
Dedicated tools run the scan on the client with the local driver and deliver the image to a TWAIN source in the remote session. TSScan compresses images on the client before they enter the RDP, Citrix or VMware virtual channel. Lossy JPEG is a separate, adjustable option (Allow lossy compression (jpeg), with a JPEG quality setting), and Raw image transfer passes data unchanged when exact pixels matter. With dynamic redirection the application sees the scanner's real capabilities, and no scanner drivers are installed on the server. RemoteScan offers lossless and lossy compression, and FabulaTech Scanner for Remote Desktop offers disabled, lossless (zlib) and JPEG modes plus scanner hardware compression, so the architectures are broadly comparable. The honest limitations: TWAIN redirection does not help applications that only support ISIS drivers, and for one flatbed used weekly on a LAN the gain over USB redirection is small.
| Approach | Where compression happens | Crosses RDP | Works well for | Falls short when |
|---|---|---|---|---|
| USB device redirection | Scanner hardware only | Yes, as USB traffic | One scanner model, LAN, low volume | Latency is high or drivers cannot go on every host |
| Network scanner to folder or email | MFP firmware | No | DMS watched folders, shared devices | The application must start or control the scan |
| Mobile scanner app | Phone camera JPEG | No | Occasional receipts and ID copies | Batches or TWAIN applications |
| Dedicated scanner redirection (TSScan, RemoteScan, FabulaTech) | Client, before the virtual channel | Yes, compressed | TWAIN applications over WAN, batches, mixed fleets | The application only supports ISIS |
TWAINDSM.DLL), set the TWAINDSM_LOG environment variable to a file path for the user running the application and scan one page. The log lists DAT_IMAGENATIVEXFER, DAT_IMAGEMEMXFER or DAT_IMAGEFILEXFER, which identifies the transfer mode.No. Native transfer hands the application a device-independent bitmap in one memory block, and TWAIN's compression negotiation applies to buffered memory and file transfers. A 300 DPI A4 color page arrives as about 26 MB however it was compressed on the network. Network compression therefore happens in the redirection layer, which decompresses before delivering the bitmap.
Usually because it is a 32-bit process holding full-size bitmaps. It has 2 GB of address space by default, or 4 GB if large-address-aware, and 50 color pages at 300 DPI occupy about 1.3 GB. Fragmentation can make a 26 MB contiguous allocation fail earlier. Scan in grayscale or black and white, split batches, or use a 64-bit version of the application.
Yes. Group 4 reproduces a black-and-white image pixel for pixel. Information is lost earlier, when grayscale or color is thresholded to 1-bit, so let the scanner driver do that conversion. Group 4 is also the compression specified for check image exchange in ANSI X9.100-181.
Only in lossless mode. Lossy JBIG2 reuses one stored symbol for characters it considers similar, and in 2013 this made Xerox WorkCentre devices replace digits in scans without visible artifacts. For financial, legal and medical records, use Group 4 or lossless JBIG2 and check the encoder setting in your PDF software or MFP.
Only if the application and the driver both support TWAIN disk file transfer with a PDF format. File transfer is optional for drivers, and most business applications use native transfer and write the PDF themselves. The PDF format and its compression are then set in the application or DMS profile, not in the scanner dialog.
Set the TWAINDSM_LOG environment variable to a log file path for the user who runs the application, restart the application and scan one page. The TWAIN 2.x Data Source Manager logs the operations it passes on, including the transfer type. Remove the variable afterwards so the log does not keep growing.
Yes, and it is usually the only image compression USB redirection gets. Scanners with a JPEG transfer option compress color and grayscale data inside the device, and the driver on the session host decompresses it. Scanners without that option send raw pixels, so color scans over a WAN become slow and sensitive to latency.
Scan compression in remote desktop scanning happens at four stages, but only compression applied on the client before the virtual channel decides how much data crosses the RDP connection. Native TWAIN transfer still delivers full-size bitmaps to the session host, so color depth and batch size drive server memory as much as bandwidth. Use lossless Group 4 for text, allow at most one lossy JPEG step for color, and keep lossy JBIG2 away from business records. Learn more about TSScan for remote desktop scanning.
All sources reviewed on 1 December 2026.