Dynamic Web TWAIN: How can I set resolution in the X and Y direction separately?

With capability negotiation, you can use the capabilities ICAP_XRESOLUTION and ICAP_YRESOLUTION to set resolution in the X and Y direction separately.

Code Snippet

DWObject.SelectSource();
    DWObject.OpenSource();
	//Set X-RESOLUTION current value.
	DWObject.Capability = EnumDWT_Cap.ICAP_XRESOLUTION;
	DWObject.CapType = EnumDWT_CapType.TWON_RANGE;
	DWObject.CapValue = 300;
	if (DWObject.CapSet())
	    alert("Successful");
	else
	    alert("Source doesn't support this capability");	
	//Set Y-RESOLUTION current value.
	DWObject.Capability = EnumDWT_Cap.ICAP_YRESOLUTION;
	DWObject.CapType = EnumDWT_CapType.TWON_RANGE;
	DWObject.CapValue = 200;
	if (DWObject.CapSet())
		alert("Successful");
	else
		alert("Source doesn't support this capability");
	DWObjet.AcquireImage();

Reference:

Capabilities

For more information, please refer to How to Perform Capability Negotiation.