Skip to main content

Search

Search

Image Printing

Comments

6 comments

  • Avatar
    Shotaro Ito

    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

    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

    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

    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

    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

Please sign in to leave a comment.