Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Sets a property of an item.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WIA | 6.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameter | Description | Example |
---|---|---|
Item | The item of current device to query. For a scanner this is typical Flatbed or Feeder. see WIA.ListItems |
"Flatbed" |
Key | The property key. Can be a text with the name of the property or the corresponding ID. |
"Name" |
Value | The new value for this property. |
Returns OK or error.
Set resolution:
MBS( "WIA.SetItemPropertyValue"; "Flatbed"; "Horizontal Resolution"; 300 ) &
MBS( "WIA.SetItemPropertyValue"; "Flatbed"; "Vertical Resolution"; 300 )
Set rotation:
MBS( "WIA.SetItemPropertyValue"; "Flatbed"; "Rotation"; 2 )
// 0 = Portrait, 1 = Landscape, 2 = Rotate 180, 3 = Rotate 270
Set gray or color:
MBS( "WIA.SetItemPropertyValue"; "Feeder"; "Current Intent"; 2)
// 1 = color
// 2 = gray
Set duplex:
Set Variable [ $r ; Value: MBS( "WIA.SetItemPropertyValue"; "Feeder"; "Document Handling Select"; 4 )
/*
1 = feeder
2 = flatbed
4 = duplex
8 = front first
16 = back first
32 = front only
64 = back only
128 = next page
256 = preferred
512 = auto advance
see
https://docs.microsoft.com/en-us/windows-hardware/drivers/image/wia-dps-document-handling-select
*/ ]
Show Custom Dialog [ "Set duplex" ; $r ]
Set to ignore blank pages:
Set Variable [ $r ; Value: MBS( "WIA.SetItemPropertyValue"; "Feeder"; "Blank Pages"; 1 )
/*
0 = Blank page detection is disabled. This is the required default value if the property is supported.
1 = The device detects blank pages and automatically skips scanning them (discards scanned data if any) and continues scanning.
2 = The device detects blank pages and acts as configured through the Job Separators property. This value is valid only when the Feeder item supports the Job Separators property.
see
https://docs.microsoft.com/en-us/windows-hardware/drivers/image/wia-ips-blank-pages
*/ ]
Show Custom Dialog [ "Set blank pages" ; $r ]
Set to scan only front page:
Set Variable [ $r ; Value: MBS( "WIA.SetItemPropertyValue"; "Feeder"; "Document Handling Select"; 32 )
Set image format to JPEG:
MBS( "WIA.SetItemPropertyValue"; "Flatbed"; "Format"; "B96B3CAE-0728-11D3-9D7B0000F81EF32E" )
Set page size:
MBS( "WIA.SetItemPropertyValue"; "Feeder"; "Page Size"; 0) // A4
Disable auto cropping:
MBS( "WIA.SetItemPropertyValue"; "Flatbed"; "Auto-Crop"; 0)
// Values are 0 = Disable, 1 = Single and 2 = Multi
Created 28th November 2016, last changed 6th March 2021
WIA.SetDevicePropertyValue - WMFP.Create
Feedback: Report problem or ask question.