Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Task printer filenames out of sync
Started by wseay at 03-07-2008 17:16. Topic has 7 replies.

Print Search « Previous Thread Next Thread »
  03-07-2008, 17:16
wseay is not online. Last active: 3/7/2008 9:59:36 PM wseay

Not Ranked
Joined on 01-04-2008
Posts 4
Task printer filenames out of sync
Reply Quote
I am using the driver to collect information for a document imaging system.  ePrint is setup with a task printer to create both a .tif and .txt file.  These files are set to use the autonumber feature for filename collisions.  I use the txt file to index the tif file.

My problem is when printing (file creation) happens as the txt/tif files are being processed.  During one task event, the text process does not see the exiting txt file, so it creates a file named 'hrm.txt.'  But the previous tif file is still there, so the new tif file is 'hrm00001.tif,' not 'hrm.tif.' 

------------------------------------------------------------
[HRM2HPF Started Crystal Reports ActiveX Designer - Standard Report A on: 03/07/08, at: 10:34:58]
Saving started.
   \\vm2\global$\hrmfeed\HRM2HPF0001.tif finished successfully.
Saving finished successfully.
Saving started.
   \\vm2\global$\hrmfeed\HRM2HPF.txt finished successfully.
Saving finished successfully.
Batch Printing started.
   HRM2HPF_Trigger finished successfully.
Batch Printing finished successfully.
[HRM2HPF Finished Crystal Reports ActiveX Designer - Standard Report A on: 03/07/08, at: 10:35:04]
-------------------------------------------------------------

Now the files are out of sync and I need to manually correct the entries.  I catch this by reviewing the activity log created by ePrint.

Is there a way that I can setup the taskprinter to always use the same filename for both tasks?  When there is an existing filename, increment the filename for all tasks.  Using date & time will not work since the seconds will never match up consistantly (I tried). 


Thanks.
   Report 
  03-10-2008, 10:23
Maen Hasan is not online. Last active: 10/5/2008 10:18:54 AM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,744
Re: Task printer filenames out of sync
Reply Quote
Hello,

I created an ePrint task printer that saves both TIFF and ASCII Text, and then sent multiple print jobs to this printer. In all my tests, the output file names for the TIFF and the associated Text file had the same numbering sequence.

Is it possible to reproduce the issue without your reporting application, for example using MS Office or any other common program? If yes, please send me the details so that I can try to test here.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
   Report 
  03-10-2008, 10:42
wseay is not online. Last active: 3/7/2008 9:59:36 PM wseay

Not Ranked
Joined on 01-04-2008
Posts 4
Re: Task printer filenames out of sync
Reply Quote
You may duplicate the issue as follows:

  • Create a task printer that creates a txt and tif file using autonumber
  • send any number of jobs to it (let's say three)
  • now delete the first txt file created
  • send another job to the task printer

Your next set of files will not match in file name.  The txt file task will start at the beginning of the sequence, while the tif task will increment to the next value.  I need both tasks to always use the same value.

Thanks...

   Report 
  03-12-2008, 10:52
Maen Hasan is not online. Last active: 10/5/2008 10:18:54 AM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,744
Re: Task printer filenames out of sync
Reply Quote
I can see the problem now. As I see it, there are 2 ways to solve it, but both will require changing your program:
1) Either change the process so that it keeps the TXT and TIF files (for example, Job005.txt and Job005.tif) until both are done processing, then delete both of them at the exact same time.

2) Or use the ePrint API to have greater control of the output file name, instead of relying on the auto-number system. Please note that if you don't have the API you will have to purchase it because it's not included in the price of ePrint itself.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
   Report 
  03-12-2008, 11:09
wseay is not online. Last active: 3/7/2008 9:59:36 PM wseay

Not Ranked
Joined on 01-04-2008
Posts 4
Re: Task printer filenames out of sync
Reply Quote

Neither of those solutions are viable.

1) The Windows OS will not delete both files at the exact same time.  It will always delete files sequentially.

2) I am using the Task Printer to capture output.  I do not have access to the source code for our application to make that type of change.  The host application simply ‘prints’ to the task printer defined.

Is there anyway to have all of the tasks defined in the task printer to use the same file name and not decide on their own what name should be used?  That would fully resolve my issue.
   Report 
  03-13-2008, 10:21
Maen Hasan is not online. Last active: 10/5/2008 10:18:54 AM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,744
Re: Task printer filenames out of sync
Reply Quote
I'm afraid there's no way to let ePrint always generate new numbers without using its API.

What about changing your process to something like this:
1. Keep the files without deleting them.
2. Every few hours stop the printing for a couple minutes.
3. During this pause, rename the folder to a different name, create a new folder of the same name, then resume printing.
4. Now you have a set of files in the old folder. If any of these files still needs processing, continue working on them. New files will be created in the new folder, because it has the same old name.
5. Once done processing in the renamed folder, delete all the files in this folder, and this will not affect the file names being generated in the new folder, because you will not be deleting anything from there.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
   Report 
  03-13-2008, 12:05
wseay is not online. Last active: 3/7/2008 9:59:36 PM wseay

Not Ranked
Joined on 01-04-2008
Posts 4
Re: Task printer filenames out of sync
Reply Quote
So are you saying that with the API I could create a custom ePrint Task printer?  If that is so, it would be worth looking into.

   Report 
  03-16-2008, 4:50
Maen Hasan is not online. Last active: 10/5/2008 10:18:54 AM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,744
Re: Task printer filenames out of sync
Reply Quote
Hello,

If you use the API, you will not get a function that sets the automatic numbering similar to what you want, but you can use it to create a monitoring application that forces the output file names to anything you want. The application would get events triggered for each print job sent to ePrint, and it would also be able to change task printer settings, including output file names, using your own code.

This means it is possible to do using the API, but it is not a ready solution. You will need to do some coding.
I recommend trying the API's free evaluation before you decide to purchase it. The API is installed with ePrint, and you can compile the demos shipped with it, which automatically unlocks the API in Evaluation mode.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » Enduser » ePrint » Task printer filenames out of sync

Powered by Community Server, by Telligent Systems