Image Printing S’abonner

0
Avatar
Legacy Poster

I am trying to automate the printing of UPS Labels.  I have a shipping process that is sending me a BMP file with the file name being tracking number.bmp  ie..  1Z878V970190030844.BMP.  All of these files come in with a unique name.  I want to scan a directory and every time a new file shows up print it to an Intermec PX41 printer loaded with 4X6 label stock.  The issue i'm having when I create a label template I can either create a label template and set a background image on the label as a linked image and rename the file to the same name every time, but I have to put in a 5 second delay to make sure this prints before it is over written with multiple people creating these labels on one printer.  I would like to get this more real time.  I tried attaching a picture to the label template, it scans the directory but if the trigger file is the bmp file  that is attached it changes the name or deletes it before it is printed and skipped over and does not print.  If I change the name to a .bmp file it will work sometimes but the next file that comes in will print all previous tags because it sees all of the bmp files.  It seems like there should be an easy way to get in a picture and auto trigger a print of this on a 4X6 label...every time a pictures gets dropped off.  Looking for any help on this.  Thanks...

6 commentaires

0
Avatar
Shotaro Ito
Actions pour les commentaires Permalien

Is that about Commander?

Is the variable data the bitmap file only?

 

When you have Enterprise Automation edition,

you can use BarTender XML script to specify named data source value - you can give picture path to the btw file at print.

Don't worry to rename BMP file to *.PIC extension - It still print image even if you have wrong extension.

 

For example:

Doc1.btw

place a picture with get path from data source. Name the data source as PICPATH.

 

Task1-Create BTXML

Detect *.bmp, rename *.pic

Save to file - using Custom template like below. Output file path to the scan folder, name like print.btxml

(in saved XML, %Trigger File Name% will be replaced by renamed picture file, C:\scan\abc.pic etc)

<?xml version="1.0"?>
<XMLScript Version="2.0">
  <Command>
    <Print>
      <Format CloseAtEndOfJob="true" SaveAtEndOfJob="false">C:\docs\Doc1.btw</Format>
      <NamedSubString Name="PICPATH">
        <Value>%Trigger File Name%</Value>
      </NamedSubString>
      <PrintSetup />
    </Print>
  </Command>
</XMLScript>

 

Task2

Detect *.btxml, rename or delete trigger file.

BTXML script to print script above.

 

One thing - you cannot reliably delete the renamed pic file after print.

Perhaps you can delete older files by running OS command like below at print time.

 

http://stackoverflow.com/questions/51054/batch-file-to-delete-files-older-than-n-days

 

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

This sounds like a good option for a solution, on the picture properties, What type of picture am I adding to the BTW Label embedded, External, Other

 

Also the trigger filename will be the bmp file on task1  then I need a second task that monitors another directory that looks for a BTXML file that will always be the same that triggers the print.  How do I specify a printer in the BTXML file to print this to?  I'm still confused by this process but it may make more sence when I try it...  I may have more questions to follow, but if this works you may save me a couple of years of struggling with this..  Probably Save about 5 seconds or more per print out.  I really appreciate the help.  I almost gave up and no one was going to read this post....  Thanks Again....

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I'm also running this and its renaming the file to a .pic but throwing and error after an invalid character was found in text content Line1 Column 8 have no idea what that is or what I'm missing..  All I did was change the BWT path to match my path...

0
Avatar
Shotaro Ito
Actions pour les commentaires Permalien

You need to add a external picture with get path from data source, then name the data source as PICPATH.

To Specify printer, 

replace
<PrintSetup />

like
<PrintSetup>
  <Printer>HP LaserJet</Printer>
</PrintSetup>

see attached sample:

 

Create

C:\Commander\Documents 

C:\Commander\Scan

folder.

Place Doc1.btw in C:\Commander\Documents.

Place the BMP file in C:\Commander\Scan.

Open Doc1.btw and print to your printer (ignore picture not found error), then save the file.

 

Then try the task list.

 

When things going wrong, run Commander as application mode(administer > Service setup) and show all bartender from detection menu to see what's happening. 

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Ok this works fantastic, tested on several tags at once and get real time on this.  Now I need to print a packing slip which comes in as a PDF.  I tried this same process pointing it to a different printer and no print out.  I assume I can add a picture box at 8.5X11 and use a datasource that will attach a pdf the same way but have not gotten it to work.  All packing slips get dropped to a packing slip directory as a PDF...  If I get this to work project is closed.  Looks like it processes and creates the script but no printout, maybe PDF's work differently have you had any experience with PDF Printing the same way...  Unless there is a way to just send the pdf directly to a printer when Bartender gets it...

 

Thanks again for all your help...

0
Avatar
Shotaro Ito
Actions pour les commentaires Permalien

Vous devez vous connecter pour laisser un commentaire.