Label Printer - rotating print data to match printer

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Label Printer - rotating print data to match printer

Post by quailcreek » Sun Apr 24, 2016 7:10 pm

Hi,
I'm having a problem printing to a Dymo 450 Turbo label printer. I have a sub stack set to 180,54 (2 3/4 x 3/4) which is the size of the labels. The printer out-puts the label long-ways. If I do a PDF preview the data looks like I would expect with the data the right size and horizontal in the screen. When I send to the printer I get 2 labels coming out with just a small horizontal a piece of the barcode on the joint between the 2 labels. I don't see anything in the printer settings to rotate the the print data on its way to the printer. Is there a way to handle this in LC?

Code: Select all

 put the uBarcode of this cd into theBarcode
   if theBarcode is empty then exit to top
   
   --   put "*" & theBarcode & "*" into fld "barcode" of cd 1 of stack "PrintBarcode" -- code 3 of 9
   put theBarcode into fld "barcode" of cd 1 of stack "PrintBarcode" -- code 128
   put fld "BCLabel" into fld "Description" of cd 1 of stack "PrintBarcode"
   
   --   open inv stack "PrintBarcode"
   open stack "PrintBarcode"
   set the printmargins to 1,1,1,1-- L, T, R, B
   set the printpapersize to 180,54 -- 2.75x.75 inches
   
   open printing with dialog
   if the result is not "Cancel" then
      print cd 1 of stack "PrintBarcode"
      close printing
      
      close stack "PrintBarcode"
   end if
Tom
MacBook Pro OS Mojave 10.14

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Label Printer - rotating print data to match printer

Post by dave.kilroy » Sun Apr 24, 2016 10:08 pm

Hi Tom, in your substack you could take a snapshot, rotate it and then try printing...
"...this is not the code you are looking for..."

SparkOut
Posts: 2949
Joined: Sun Sep 23, 2007 4:58 pm

Re: Label Printer - rotating print data to match printer

Post by SparkOut » Mon Apr 25, 2016 6:47 am

Have you tried :
set the printPaperOrientation to "Landscape"
? If so, what were the results?

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: Label Printer - rotating print data to match printer

Post by quailcreek » Mon Apr 25, 2016 3:24 pm

Hi SparkOut,
With set the printPaperOrientation to "Landscape" the preview shows the paper reoriented but the print data is still portrait. So this does get a step closer.
Tom
MacBook Pro OS Mojave 10.14

Post Reply