dsandor / dymojs

A pure javascript library for printing labels on a Dymo Labelwriter printer from the browser or from nodejs.
128 stars 30 forks source link

how do you print to the right or left label on a labelwriter 450 twin turbo? #3

Open dchan14 opened 6 years ago

dchan14 commented 6 years ago

great package works fine for a single sided printer but how do i get these options paramsXml: dymo.label.framework.createLabelWriterPrintParamsXml({copies:1,twinTurboRoll:'Right',printQuality:'Text'}), labelSetXml: new dymo.label.framework.LabelSetBuilder(), labelXmlDymo: dymo.label.framework.openLabelXml(labelXml),

NicolaiF commented 6 years ago

I saw your fork, where you added functionality for printparams. Does this mean you can choose to print left or tight using a 450 twin turbo?

dchan14 commented 6 years ago

printparams = 'Left '

On Mon, Apr 2, 2018 at 2:02 PM, NicolaiF notifications@github.com wrote:

I saw your fork, where you added added (?) functionality for printparams. Does this mean you can choose to print left or tight using a 450 twin turbo?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dsandor/dymojs/issues/3#issuecomment-377995470, or mute the thread https://github.com/notifications/unsubscribe-auth/AFTlHE4X3CnZuph5fXscXKXkjbKxRQ82ks5tkmeagaJpZM4RxUkg .

NicolaiF commented 6 years ago

Superb, thanks man!

satrugna commented 2 years ago

Hello, Could you please let me know where to add printparams = 'Left '? Thank you!

srikanthpavuluri commented 2 years ago

printparams = 'Left ' On Mon, Apr 2, 2018 at 2:02 PM, NicolaiF @.***> wrote: I saw your fork, where you added added (?) functionality for printparams. Does this mean you can choose to print left or tight using a 450 twin turbo? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#3 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AFTlHE4X3CnZuph5fXscXKXkjbKxRQ82ks5tkmeagaJpZM4RxUkg .

Can you help where exactly we need provide this tag in xml?

NicolaiF commented 2 years ago

If you check the source code for dchan's fork https://github.com/dchan14/dymojs/blob/master/lib/index.js#L24 you'll see it's the third parameter of the print function

So you'll do something like this dymo.print( printerName, // Name of the printer you're using printlabel(), // The main XML that you're printing Right// third parameter for PrintParams );

srikanthpavuluri commented 2 years ago

Yeah! Thanks a lot. Will try that.

But we are unable to print labels from the application hosted on a server. And it works absolutely fine in local env.

For example - http://localhost:41951/ -> works fine in local.

Will the hostname change in the non-local/prod application?

but when it is accessed from the hosted application it fails to get the connection status of the Dymo service.