Printing badge size labels

Hey guys,
I was wondering if anyone has done any small size printing. We have this visitor page that signs them in and prints their info on on 4x2(in) sticky badges. I've got the page working and all, where I'm struggling is to get the print to come out right, it keeps coming out smaller and on bottom left corner. I tried to mess around with all the print job properties and see if I can get it working but no luck.
I've created a group called print that receives all the entered data and displays in on that label and I print that label.
this is one of the test script codes I tried with no luck.

job = system.print.createPrintJob(event.source.parent.getComponent('Print'))
job.setShowPrintDialog(0)
job.setPageHeight(3)
job.setPageWidth(5)
job.setMargins(0.5)
job.setOrientation(0)
job.setFitToPage(1)
job.print()

I appreciate and suggestions you guys have.

What printer are you using? What OS?

Windows 8.1 Pro and Printer is DYMO Label Writer 450 Turbo

There's another relevant thread here on it. Did you happen to see it?

Sorry, posted before my thought was done. Darn age… heh.

I’d try getting rid of the page width, and set the height higher. the fit to page should shrink it okay, but doesn’t always do well expanding things out.

ahh, I did search the forum but didn’t search it by printer name… rookie mistake on my part lol…
I’ll look over that thread and try your suggestion and see what happens.

1 Like

So the printer dialog has a tab that has sizes, on default it’s set on some label CD, if I change it to “99014 Name Badge Label” the print comes out pretty darn close. I looked that up and its 89mm x 26mm I even tried to put those measurement in inches on set height and width but still no luck. Am I missing something else that size setting does beside the height and width? or is there a way to specifically select that size in scripting code?

Not sure how much more I can help you out on this one. I don’t have anything similar to play with (all my labelers are Zebra).

However, I did find a github entry that has a Java implementation for Dymo. That might give you some ideas to noodle around.

1 Like

The size settings here in this code are in inches.
I am not using the print dialog which is why I have setShowPrintDialog set to 0

#Print the Barcode to a Label
job = system.print.createPrintJob(event.source.parent.getComponent('Barcode'))
job.setPrinterName("DYMO LabelWriter 450 Turbo")
#job.setPrinterName("\\\wbysr002\\WBY TOSHIBA 2ND FLOOR")
job.setOrientation(0)

job.setMargins(0.05)
job.setPageHeight(3.5)
job.setPageWidth(1)
job.setFitToPage(1)
job.setShowPrintDialog(0)
job.print()

Thanks, I will test this, one other question, did you set your barcode component size accordingly?

If the barcode is in a container and you print the container, it will be much easier.

Yes my container is in the same page I’m triggering the print from. I just didn’t know how much the sizing of the component will make a difference.

I am trying to print on a 4" by 2.5" label now. I can’t seem to set my margins, even with the print dialog settings.

what does it look like? your description is not clear. can you send a picture of how the label looks?