Home All Groups Group Topic Archive Search About

Check if TIF file in use

Author
11 Apr 2006 6:30 PM
ValK
Hi,

Here is my problem. I need to check if scanner finished scanning the
document. I'm using scanner interface that came with the scanner.

I tried to open file and catch IO Exception for "The process cannot access
the file
....., because it is being used by another process." It worked with .PDF but
not with TIF files. It will allow me to open file while scanning.

Any suggestions ????

Thanks

Val

Author
11 Apr 2006 7:12 PM
Jeff Dillon
The scanner interface doesn's support a "complete" callback?

Jeff

Show quoteHide quote
"ValK" <V***@discussions.microsoft.com> wrote in message
news:D0FBA600-E821-4CE9-89C4-C134A675982A@microsoft.com...
> Hi,
>
> Here is my problem. I need to check if scanner finished scanning the
> document. I'm using scanner interface that came with the scanner.
>
> I tried to open file and catch IO Exception for "The process cannot access
> the file
> ...., because it is being used by another process." It worked with .PDF
> but
> not with TIF files. It will allow me to open file while scanning.
>
> Any suggestions ????
>
> Thanks
>
> Val
Author
11 Apr 2006 8:03 PM
ValK
Jeff,

I'm not sure if I understand your question. Scanner interface it just a
program thet comes with the scanner. It seems like it doesn't put handle on
the file.

Show quoteHide quote
"Jeff Dillon" wrote:

> The scanner interface doesn's support a "complete" callback?
>
> Jeff
>
> "ValK" <V***@discussions.microsoft.com> wrote in message
> news:D0FBA600-E821-4CE9-89C4-C134A675982A@microsoft.com...
> > Hi,
> >
> > Here is my problem. I need to check if scanner finished scanning the
> > document. I'm using scanner interface that came with the scanner.
> >
> > I tried to open file and catch IO Exception for "The process cannot access
> > the file
> > ...., because it is being used by another process." It worked with .PDF
> > but
> > not with TIF files. It will allow me to open file while scanning.
> >
> > Any suggestions ????
> >
> > Thanks
> >
> > Val
>
>
>
Author
11 Apr 2006 8:52 PM
Jeff Dillon
No, I mean, there isn't something you can call, to see if the job is
complete? When you say interface, is it a com or .NET object? Or just an exe
that you launch.

Like

do while not scannerObject.Complete
    wait
loop

Now process the file...

Jeff
Show quoteHide quote
"ValK" <V***@discussions.microsoft.com> wrote in message
news:0C4B4F65-279B-4867-B830-C18D6117BA1D@microsoft.com...
> Jeff,
>
> I'm not sure if I understand your question. Scanner interface it just a
> program thet comes with the scanner. It seems like it doesn't put handle
> on
> the file.
>
> "Jeff Dillon" wrote:
>
>> The scanner interface doesn's support a "complete" callback?
>>
>> Jeff
>>
>> "ValK" <V***@discussions.microsoft.com> wrote in message
>> news:D0FBA600-E821-4CE9-89C4-C134A675982A@microsoft.com...
>> > Hi,
>> >
>> > Here is my problem. I need to check if scanner finished scanning the
>> > document. I'm using scanner interface that came with the scanner.
>> >
>> > I tried to open file and catch IO Exception for "The process cannot
>> > access
>> > the file
>> > ...., because it is being used by another process." It worked with .PDF
>> > but
>> > not with TIF files. It will allow me to open file while scanning.
>> >
>> > Any suggestions ????
>> >
>> > Thanks
>> >
>> > Val
>>
>>
>>
Author
11 Apr 2006 7:22 PM
Hauer Wolfgang
Hi!

Have you tried to rename the file?

Wolfgang

Show quoteHide quote
"ValK" <V***@discussions.microsoft.com> schrieb im Newsbeitrag
news:D0FBA600-E821-4CE9-89C4-C134A675982A@microsoft.com...
> Hi,
>
> Here is my problem. I need to check if scanner finished scanning the
> document. I'm using scanner interface that came with the scanner.
>
> I tried to open file and catch IO Exception for "The process cannot access
> the file
> ...., because it is being used by another process." It worked with .PDF
> but
> not with TIF files. It will allow me to open file while scanning.
>
> Any suggestions ????
>
> Thanks
>
> Val
Author
11 Apr 2006 8:04 PM
ValK
Hi Hauer!
I just tried that. It didn't work :(

Show quoteHide quote
"Hauer Wolfgang" wrote:

> Hi!
>
> Have you tried to rename the file?
>
> Wolfgang
>
> "ValK" <V***@discussions.microsoft.com> schrieb im Newsbeitrag
> news:D0FBA600-E821-4CE9-89C4-C134A675982A@microsoft.com...
> > Hi,
> >
> > Here is my problem. I need to check if scanner finished scanning the
> > document. I'm using scanner interface that came with the scanner.
> >
> > I tried to open file and catch IO Exception for "The process cannot access
> > the file
> > ...., because it is being used by another process." It worked with .PDF
> > but
> > not with TIF files. It will allow me to open file while scanning.
> >
> > Any suggestions ????
> >
> > Thanks
> >
> > Val
>
>
>
Author
11 Apr 2006 7:46 PM
Herfried K. Wagner [MVP]
"ValK" <V***@discussions.microsoft.com> schrieb:
> Here is my problem. I need to check if scanner finished scanning the
> document. I'm using scanner interface that came with the scanner.
>
> I tried to open file and catch IO Exception for "The process cannot access
> the file
> ...., because it is being used by another process." It worked with .PDF
> but
> not with TIF files. It will allow me to open file while scanning.

How are you attempting to open the TIF file?  You could try to open a file
stream (class 'FileStream') with appropriate share mode set and construct a
'Bitmap' object from this stream.  Note that it's necessary to keep the
stream open as long as the bitmap object exists.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
11 Apr 2006 8:07 PM
ValK
Hi Herfried,
I'm using FileStream. This is my code example:

  Dim fileObj As New System.IO.FileStream(sFile, FileMode.OpenOrCreate,
FileAccess.Write, FileShare.None)







Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "ValK" <V***@discussions.microsoft.com> schrieb:
> > Here is my problem. I need to check if scanner finished scanning the
> > document. I'm using scanner interface that came with the scanner.
> >
> > I tried to open file and catch IO Exception for "The process cannot access
> > the file
> > ...., because it is being used by another process." It worked with .PDF
> > but
> > not with TIF files. It will allow me to open file while scanning.
>
> How are you attempting to open the TIF file?  You could try to open a file
> stream (class 'FileStream') with appropriate share mode set and construct a
> 'Bitmap' object from this stream.  Note that it's necessary to keep the
> stream open as long as the bitmap object exists.
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
>
Author
11 Apr 2006 8:13 PM
Herfried K. Wagner [MVP]
"ValK" <V***@discussions.microsoft.com> schrieb:
> I'm using FileStream. This is my code example:
>
>  Dim fileObj As New System.IO.FileStream(sFile, FileMode.OpenOrCreate,
> FileAccess.Write, FileShare.None)

Use 'FileShare.ReadWrite'.  The value of this parameter determines which
operations /other processes/ can perform while your application is accessing
the file.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
11 Apr 2006 8:27 PM
ValK
I just tried that too. Didn't work. Still can open file while the scanning.

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "ValK" <V***@discussions.microsoft.com> schrieb:
> > I'm using FileStream. This is my code example:
> >
> >  Dim fileObj As New System.IO.FileStream(sFile, FileMode.OpenOrCreate,
> > FileAccess.Write, FileShare.None)
>
> Use 'FileShare.ReadWrite'.  The value of this parameter determines which
> operations /other processes/ can perform while your application is accessing
> the file.
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
>
Author
11 Apr 2006 8:33 PM
Herfried K. Wagner [MVP]
"ValK" <V***@discussions.microsoft.com> schrieb:
>I just tried that too. Didn't work. Still can open file while the scanning.

Is it possible to open the file with another application such an image
viewer/editor while it is being accessed by the scanner?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
11 Apr 2006 9:01 PM
ValK
Yes, I can open file with Microsoft Office Document Imaging without any errors.

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "ValK" <V***@discussions.microsoft.com> schrieb:
> >I just tried that too. Didn't work. Still can open file while the scanning.
>
> Is it possible to open the file with another application such an image
> viewer/editor while it is being accessed by the scanner?
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
>
Author
11 Apr 2006 8:53 PM
Jeff Dillon
Wait till the scanner program is done!

Show quoteHide quote
"ValK" <V***@discussions.microsoft.com> wrote in message
news:07638854-170A-4722-87CB-BFB47B96EE03@microsoft.com...
>I just tried that too. Didn't work. Still can open file while the scanning.
>
> "Herfried K. Wagner [MVP]" wrote:
>
>> "ValK" <V***@discussions.microsoft.com> schrieb:
>> > I'm using FileStream. This is my code example:
>> >
>> >  Dim fileObj As New System.IO.FileStream(sFile, FileMode.OpenOrCreate,
>> > FileAccess.Write, FileShare.None)
>>
>> Use 'FileShare.ReadWrite'.  The value of this parameter determines which
>> operations /other processes/ can perform while your application is
>> accessing
>> the file.
>>
>> --
>>  M S   Herfried K. Wagner
>> M V P  <URL:http://dotnet.mvps.org/>
>>  V B   <URL:http://classicvb.org/petition/>
>>
>>
Author
11 Apr 2006 9:09 PM
ValK
Jeff,
1) It's stand alone application (exe), user interface. User can select
available scanner, file format, dpi, scanning directory
2) How would I know "The scanner program is done" :)

Show quoteHide quote
"Jeff Dillon" wrote:

> Wait till the scanner program is done!
>
> "ValK" <V***@discussions.microsoft.com> wrote in message
> news:07638854-170A-4722-87CB-BFB47B96EE03@microsoft.com...
> >I just tried that too. Didn't work. Still can open file while the scanning.
> >
> > "Herfried K. Wagner [MVP]" wrote:
> >
> >> "ValK" <V***@discussions.microsoft.com> schrieb:
> >> > I'm using FileStream. This is my code example:
> >> >
> >> >  Dim fileObj As New System.IO.FileStream(sFile, FileMode.OpenOrCreate,
> >> > FileAccess.Write, FileShare.None)
> >>
> >> Use 'FileShare.ReadWrite'.  The value of this parameter determines which
> >> operations /other processes/ can perform while your application is
> >> accessing
> >> the file.
> >>
> >> --
> >>  M S   Herfried K. Wagner
> >> M V P  <URL:http://dotnet.mvps.org/>
> >>  V B   <URL:http://classicvb.org/petition/>
> >>
> >>
>
>
>
Author
11 Apr 2006 9:17 PM
Jeff Dillon
I thought you meant "programmatic interface", not "user interface".

What type of scanner is it? If HP, there are programmatic interfaces
available.

So how are you currently retrieving the file name and directory to where the
user is placing the file?

Jeff

Show quoteHide quote
"ValK" <V***@discussions.microsoft.com> wrote in message
news:3924E5A7-0BD6-4ED0-A5A0-F0EF1FC34C84@microsoft.com...
> Jeff,
> 1) It's stand alone application (exe), user interface. User can select
> available scanner, file format, dpi, scanning directory
> 2) How would I know "The scanner program is done" :)
>
> "Jeff Dillon" wrote:
>
>> Wait till the scanner program is done!
>>
>> "ValK" <V***@discussions.microsoft.com> wrote in message
>> news:07638854-170A-4722-87CB-BFB47B96EE03@microsoft.com...
>> >I just tried that too. Didn't work. Still can open file while the
>> >scanning.
>> >
>> > "Herfried K. Wagner [MVP]" wrote:
>> >
>> >> "ValK" <V***@discussions.microsoft.com> schrieb:
>> >> > I'm using FileStream. This is my code example:
>> >> >
>> >> >  Dim fileObj As New System.IO.FileStream(sFile,
>> >> > FileMode.OpenOrCreate,
>> >> > FileAccess.Write, FileShare.None)
>> >>
>> >> Use 'FileShare.ReadWrite'.  The value of this parameter determines
>> >> which
>> >> operations /other processes/ can perform while your application is
>> >> accessing
>> >> the file.
>> >>
>> >> --
>> >>  M S   Herfried K. Wagner
>> >> M V P  <URL:http://dotnet.mvps.org/>
>> >>  V B   <URL:http://classicvb.org/petition/>
>> >>
>> >>
>>
>>
>>
Author
12 Apr 2006 12:37 PM
ValK
It's Canon DR9080C. It comes with scanning software "Capture Perfect".
"Capture Perfect" program allow user to name file, choose resolution and so
on.
All users will scan files to the same directory(c:\temp). My service
monitoring c:\temp for incoming files and process them. Scanning format TIF
and PDF only

Show quoteHide quote
"Jeff Dillon" wrote:

> I thought you meant "programmatic interface", not "user interface".
>
> What type of scanner is it? If HP, there are programmatic interfaces
> available.
>
> So how are you currently retrieving the file name and directory to where the
> user is placing the file?
>
> Jeff
>
> "ValK" <V***@discussions.microsoft.com> wrote in message
> news:3924E5A7-0BD6-4ED0-A5A0-F0EF1FC34C84@microsoft.com...
> > Jeff,
> > 1) It's stand alone application (exe), user interface. User can select
> > available scanner, file format, dpi, scanning directory
> > 2) How would I know "The scanner program is done" :)
> >
> > "Jeff Dillon" wrote:
> >
> >> Wait till the scanner program is done!
> >>
> >> "ValK" <V***@discussions.microsoft.com> wrote in message
> >> news:07638854-170A-4722-87CB-BFB47B96EE03@microsoft.com...
> >> >I just tried that too. Didn't work. Still can open file while the
> >> >scanning.
> >> >
> >> > "Herfried K. Wagner [MVP]" wrote:
> >> >
> >> >> "ValK" <V***@discussions.microsoft.com> schrieb:
> >> >> > I'm using FileStream. This is my code example:
> >> >> >
> >> >> >  Dim fileObj As New System.IO.FileStream(sFile,
> >> >> > FileMode.OpenOrCreate,
> >> >> > FileAccess.Write, FileShare.None)
> >> >>
> >> >> Use 'FileShare.ReadWrite'.  The value of this parameter determines
> >> >> which
> >> >> operations /other processes/ can perform while your application is
> >> >> accessing
> >> >> the file.
> >> >>
> >> >> --
> >> >>  M S   Herfried K. Wagner
> >> >> M V P  <URL:http://dotnet.mvps.org/>
> >> >>  V B   <URL:http://classicvb.org/petition/>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
Author
13 Apr 2006 5:35 AM
Stephany Young
Are you sure you tried this with FileShare.None specified for the share
argument?

FileShare.None means that you can't open the file if something else has it
open (in any way, shape or form) and, once you have it open, nothing else
can open it untill you close it.

It is what is commonly known as 'opening a file for exclusive use' and it
works reliably.

If the scanner is still writing the file I would expect that you get an
exception when you attempt to open the file in this manner.

If you don't, and the scanner is still writing the file, then it would
indicate that the scanner is opening and closing the file each time it
writes a block.

Because of the critical nature of the file (it is only the entire file that
has any meaning), if anyone who worked for me wrote a piece of code like
that, they would be looking for another job.




Show quoteHide quote
"ValK" <V***@discussions.microsoft.com> wrote in message
news:07638854-170A-4722-87CB-BFB47B96EE03@microsoft.com...
>I just tried that too. Didn't work. Still can open file while the scanning.
>
> "Herfried K. Wagner [MVP]" wrote:
>
>> "ValK" <V***@discussions.microsoft.com> schrieb:
>> > I'm using FileStream. This is my code example:
>> >
>> >  Dim fileObj As New System.IO.FileStream(sFile, FileMode.OpenOrCreate,
>> > FileAccess.Write, FileShare.None)
>>
>> Use 'FileShare.ReadWrite'.  The value of this parameter determines which
>> operations /other processes/ can perform while your application is
>> accessing
>> the file.
>>
>> --
>>  M S   Herfried K. Wagner
>> M V P  <URL:http://dotnet.mvps.org/>
>>  V B   <URL:http://classicvb.org/petition/>
>>
>>
Author
13 Apr 2006 12:30 PM
ValK
Stephany,
Yes, I tried to open with FileShare.None and it doesn't work. I can open file
while the scanner is still writing without any exceptions. It seems like
Canon "Capture Perfect" software is opening and closing the file each time it
writes
to it. It looks strange to me, because they handle PDF format properly. I
will call Canon today and find out what is going on.
Thanks for reply.

Val



Show quoteHide quote
"Stephany Young" wrote:

> Are you sure you tried this with FileShare.None specified for the share
> argument?
>
> FileShare.None means that you can't open the file if something else has it
> open (in any way, shape or form) and, once you have it open, nothing else
> can open it untill you close it.
>
> It is what is commonly known as 'opening a file for exclusive use' and it
> works reliably.
>
> If the scanner is still writing the file I would expect that you get an
> exception when you attempt to open the file in this manner.
>
> If you don't, and the scanner is still writing the file, then it would
> indicate that the scanner is opening and closing the file each time it
> writes a block.
>
> Because of the critical nature of the file (it is only the entire file that
> has any meaning), if anyone who worked for me wrote a piece of code like
> that, they would be looking for another job.
>
>
>
>
> "ValK" <V***@discussions.microsoft.com> wrote in message
> news:07638854-170A-4722-87CB-BFB47B96EE03@microsoft.com...
> >I just tried that too. Didn't work. Still can open file while the scanning.
> >
> > "Herfried K. Wagner [MVP]" wrote:
> >
> >> "ValK" <V***@discussions.microsoft.com> schrieb:
> >> > I'm using FileStream. This is my code example:
> >> >
> >> >  Dim fileObj As New System.IO.FileStream(sFile, FileMode.OpenOrCreate,
> >> > FileAccess.Write, FileShare.None)
> >>
> >> Use 'FileShare.ReadWrite'.  The value of this parameter determines which
> >> operations /other processes/ can perform while your application is
> >> accessing
> >> the file.
> >>
> >> --
> >>  M S   Herfried K. Wagner
> >> M V P  <URL:http://dotnet.mvps.org/>
> >>  V B   <URL:http://classicvb.org/petition/>
> >>
> >>
>
>
>
Author
12 Apr 2006 10:56 AM
Andrew Morton
ValK wrote:
> Here is my problem. I need to check if scanner finished scanning the
> document. I'm using scanner interface that came with the scanner.
>
> I tried to open file and catch IO Exception for "The process cannot
> access the file
> ...., because it is being used by another process." It worked with
> .PDF but not with TIF files. It will allow me to open file while
> scanning.

You could monitor the file size and when it hasn't increased for n seconds
then assume the scanning is done. Now your problem is changed to determining
a suitable value for n.

Or you could read the start of the TIF file until you find the marker/data
part which tells you how much image data there is and then you can calculate
the final size and wait until the file has reached that size.

Andrew
Author
12 Apr 2006 12:29 PM
ValK
Andrew,
This is exactly how I have done. But this will slow down my process a big
time. Some times we have over 500 files in scanning directory.
It just drives me crazy… Why everything works the way it should with PDF but
not TIF?

Here is my function: I give 6 seconds pause

    Private Function isFileInUse(ByVal sFile As String) As Boolean

        Try
            Dim fi As System.IO.FileInfo
            Dim nLastSize As Long
            Dim nNewSize As Long

            fi = New System.IO.FileInfo(sFile)


            fi.Refresh()
            nLastSize = fi.Length
            Thread.Sleep(6000)
            fi.Refresh()
            nNewSize = fi.Length

            If nLastSize <> nNewSize Then
                Return True
            Else
                Return False
            End If

            fi = Nothing

        Catch ex As Exception
            Throw
        End Try

    End Function









Show quoteHide quote
"Andrew Morton" wrote:

> ValK wrote:
> > Here is my problem. I need to check if scanner finished scanning the
> > document. I'm using scanner interface that came with the scanner.
> >
> > I tried to open file and catch IO Exception for "The process cannot
> > access the file
> > ...., because it is being used by another process." It worked with
> > .PDF but not with TIF files. It will allow me to open file while
> > scanning.
>
> You could monitor the file size and when it hasn't increased for n seconds
> then assume the scanning is done. Now your problem is changed to determining
> a suitable value for n.
>
> Or you could read the start of the TIF file until you find the marker/data
> part which tells you how much image data there is and then you can calculate
> the final size and wait until the file has reached that size.
>
> Andrew
>
>
>
Author
12 Apr 2006 2:12 PM
Andrew Morton
ValK wrote:
> Andrew,
> This is exactly how I have done. But this will slow down my process a
> big time.

In that case, use the second method I suggested.

> big time. Some times we have over 500 files in scanning directory.

Do you mean you have 500 scanners running at the same time? If you only have
one document being scanned at a time then you can process all but the one
with the newest file date, then inspect that last file.

Have you asked Canon for help?

> It just drives me crazy. Why everything works the way it should with
> PDF but not TIF?

Because you want to work with TIFFs. If you /wanted/ to work with PDF files,
they would stop working ;-)

Andrew
Author
12 Apr 2006 3:05 PM
ValK
We may have more than one document at the same time. Let's say client has 10
scanners and they all scanning to the same shared directory, monitoring by
our service. I have to grab file, check if scanning complete and process the
file. If file still in scanning, then skip file and go to the next one.

I guess the best solution would be to write our own scanner user interface
and control files from there(keep file open untill its done, or shoot the
trigger file with the same name, but different extention to the same
directory after its done).  :) I'm not sure if company will go with this
approach.

Show quoteHide quote
"Andrew Morton" wrote:

> ValK wrote:
> > Andrew,
> > This is exactly how I have done. But this will slow down my process a
> > big time.
>
> In that case, use the second method I suggested.
>
> > big time. Some times we have over 500 files in scanning directory.
>
> Do you mean you have 500 scanners running at the same time? If you only have
> one document being scanned at a time then you can process all but the one
> with the newest file date, then inspect that last file.
>
> Have you asked Canon for help?
>
> > It just drives me crazy. Why everything works the way it should with
> > PDF but not TIF?
>
> Because you want to work with TIFFs. If you /wanted/ to work with PDF files,
> they would stop working ;-)
>
> Andrew
>
>
>
Author
12 Apr 2006 3:52 PM
Jeff Dillon
Or do as I suggested, and use a programmatic interface as supplied by
Cannon. I'm sure they would have a "job complete" call back

Jeff

Show quoteHide quote
"ValK" <V***@discussions.microsoft.com> wrote in message
news:527E2056-4A66-4B1C-BC1B-8C81DFAA6623@microsoft.com...
> We may have more than one document at the same time. Let's say client has
> 10
> scanners and they all scanning to the same shared directory, monitoring by
> our service. I have to grab file, check if scanning complete and process
> the
> file. If file still in scanning, then skip file and go to the next one.
>
> I guess the best solution would be to write our own scanner user interface
> and control files from there(keep file open untill its done, or shoot the
> trigger file with the same name, but different extention to the same
> directory after its done).  :) I'm not sure if company will go with this
> approach.
>
> "Andrew Morton" wrote:
>
>> ValK wrote:
>> > Andrew,
>> > This is exactly how I have done. But this will slow down my process a
>> > big time.
>>
>> In that case, use the second method I suggested.
>>
>> > big time. Some times we have over 500 files in scanning directory.
>>
>> Do you mean you have 500 scanners running at the same time? If you only
>> have
>> one document being scanned at a time then you can process all but the one
>> with the newest file date, then inspect that last file.
>>
>> Have you asked Canon for help?
>>
>> > It just drives me crazy. Why everything works the way it should with
>> > PDF but not TIF?
>>
>> Because you want to work with TIFFs. If you /wanted/ to work with PDF
>> files,
>> they would stop working ;-)
>>
>> Andrew
>>
>>
>>
Author
12 Apr 2006 4:33 PM
Jeff Dillon
http://www.meliorasoft.com/articles/article01.php

Show quote Hide quote
"ValK" <V***@discussions.microsoft.com> wrote in message
news:527E2056-4A66-4B1C-BC1B-8C81DFAA6623@microsoft.com...
> We may have more than one document at the same time. Let's say client has
> 10
> scanners and they all scanning to the same shared directory, monitoring by
> our service. I have to grab file, check if scanning complete and process
> the
> file. If file still in scanning, then skip file and go to the next one.
>
> I guess the best solution would be to write our own scanner user interface
> and control files from there(keep file open untill its done, or shoot the
> trigger file with the same name, but different extention to the same
> directory after its done).  :) I'm not sure if company will go with this
> approach.
>
> "Andrew Morton" wrote:
>
>> ValK wrote:
>> > Andrew,
>> > This is exactly how I have done. But this will slow down my process a
>> > big time.
>>
>> In that case, use the second method I suggested.
>>
>> > big time. Some times we have over 500 files in scanning directory.
>>
>> Do you mean you have 500 scanners running at the same time? If you only
>> have
>> one document being scanned at a time then you can process all but the one
>> with the newest file date, then inspect that last file.
>>
>> Have you asked Canon for help?
>>
>> > It just drives me crazy. Why everything works the way it should with
>> > PDF but not TIF?
>>
>> Because you want to work with TIFFs. If you /wanted/ to work with PDF
>> files,
>> they would stop working ;-)
>>
>> Andrew
>>
>>
>>
Author
13 Apr 2006 1:42 PM
ValK
Andrew,
Do you have any code examples or articles how to find the marker/data part
of the file?
Thanks,

Val

Show quoteHide quote
"Andrew Morton" wrote:

> ValK wrote:
> > Andrew,
> > This is exactly how I have done. But this will slow down my process a
> > big time.
>
> In that case, use the second method I suggested.
>
> > big time. Some times we have over 500 files in scanning directory.
>
> Do you mean you have 500 scanners running at the same time? If you only have
> one document being scanned at a time then you can process all but the one
> with the newest file date, then inspect that last file.
>
> Have you asked Canon for help?
>
> > It just drives me crazy. Why everything works the way it should with
> > PDF but not TIF?
>
> Because you want to work with TIFFs. If you /wanted/ to work with PDF files,
> they would stop working ;-)
>
> Andrew
>
>
>
Author
13 Apr 2006 2:28 PM
Andrew Morton
ValK wrote:
> Andrew,
> Do you have any code examples or articles how to find the marker/data
> part of the file?

Search for tif at www.wotsit.org - I'd trust the Adobe document most, and
hope that Canon conform to it.

Or if you have Photoshop 6, I think it's in the SDK which you can install
from the CD....<has a look>... yes it is. Go for the wotsit doc.

Good luck!

Andrew
Author
13 Apr 2006 4:56 PM
Jeff Dillon
Wait till it's done.

Show quoteHide quote
"ValK" <V***@discussions.microsoft.com> wrote in message
news:11E4BC45-9900-44B2-BDB9-F3452A3B9962@microsoft.com...
> Andrew,
> Do you have any code examples or articles how to find the marker/data part
> of the file?
> Thanks,
>
> Val
>
> "Andrew Morton" wrote:
>
>> ValK wrote:
>> > Andrew,
>> > This is exactly how I have done. But this will slow down my process a
>> > big time.
>>
>> In that case, use the second method I suggested.
>>
>> > big time. Some times we have over 500 files in scanning directory.
>>
>> Do you mean you have 500 scanners running at the same time? If you only
>> have
>> one document being scanned at a time then you can process all but the one
>> with the newest file date, then inspect that last file.
>>
>> Have you asked Canon for help?
>>
>> > It just drives me crazy. Why everything works the way it should with
>> > PDF but not TIF?
>>
>> Because you want to work with TIFFs. If you /wanted/ to work with PDF
>> files,
>> they would stop working ;-)
>>
>> Andrew
>>
>>
>>