Use The Encoded Image Data To Trigger Print -- Is It Possible Follow

0

Hello, I have a question, wondering if it is even possible to use the encoded image data to trigger a print?

here is my case

1. I created a socket connection to Bartender (10.1, Enterprise Automation) server commander task, send some data, and the label document asking for preview images

2. Bartender/Commander executed the request and sends back a response with the images encoded -- a bunch of base64 characters, which I am able to present (as images) to user, and keeps track of them in my program.

3. user makes selections,  for example, suppose that there are three images in total, user wants to print number 1 image 1 time, number 2 image 3 times, don't print number 3 image at all

4. my program recorded/associated the number of copies to the image/encoded data string respectively

5. Here comes my question -- can I then from my program, send the image (base64 encoded character string) as a trigger to have them printed? which would be, to send number 1 image character string 1 time, number 2 image character string 3 times and don't send the number 3 image at all.

Is this somehow possible? or I'd have to repeat step 1 but instead ask to print by sending number 1 data 1 time, number 2 data 3 times in one print job?

 

Thanks in advance!

 

Ben

 

4 comments

0
Avatar
Domingo Rodriguez
Moderator
Comment actions Permalink

Ben,

 

Could you also attach your BarTender document (.btw) by using the "More Reply Options..." button?

 

Are you looking to place 1 trigger file per Base64 image, or one trigger file containing all images to print?

0
Avatar
Legacy Poster
Comment actions Permalink

Thanks Please see attached document template. suppose I have sent 5 kindred IDs (with other data too) over to Bartender and got five images(base64) back for user to preview, based on user's choices, I'd like to send the images(base64) right back to Bartender, for example

if user choose to print 1 label for kindred ID number 1, I'll send just one base64 code over;

if user choose to print 2 labels for kindred ID number 2, I'll concatenate its base 64 code twice, but of couse with some delimiter.

 

please let me know if this does not make sense.

 

Thanks.

 

ben

0
Avatar
Legacy Poster
Comment actions Permalink

And I'd add that I prefer to use one trigger to print all images -- this way they will be printed as one job and I can make sure the labels come out in the order the data were sent.

0
Avatar
Domingo Rodriguez
Moderator
Comment actions Permalink

Let's see if the below helps:

 

  1. In BarTender, you would create a new BarTender document (.btw) and place an "Encoded Picture Data" graphic object on it. 
  2. As the Encoding for the graphic, you would choose "Base64".
  3. Still on the "Picture" object, select the data source on the left node. Use the "Database Connection Setup..." button to connect to a sample database which will contain the same structure as the "Base64" data files you will be sending at print time.
  4. Once the connection to the database has been performed, relate the Picture data source with the corresponding database field containing the Base64 image.

 

** I'm not sure how this would behave with more than one Base64 picture in the trigger file. Please start by testing with one picture to see if it works properly.

Please sign in to leave a comment.