check scanprogress of scanimage and give it to kdialog progreebar in a bash script


first of all excuse my broken english…

I work on a script to scan into multiple pdf’s. I use kdialog for the
frontend and all woks fine. At least, I would like to show the progressbar
of kdialog during scanning.
If I use scanimage -p, scanimage gives me the progress as a counter from 0%
to 100% in a single line.
How can I use this to write it into an output for using in kdialog?

Thx for your help