LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: addebito on May 14, 2020, 04:36:06 PM

Title: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 14, 2020, 04:36:06 PM
Hi at all,

I can't print correctly a label on a DYMO LabelWriter 450 (picture attached).
I've set a custom size of 88 x 35 mm (that's the size of the label), I see correctly the preview but the printed label it's quite different, there is a lot of margin (top, left and right). I don't understand how to resize correctly the content.
Attached some picture and a demo label file (label.lrxml)

Do you have any advice?
Thank you.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: Arin Alex on May 15, 2020, 09:33:00 AM
Hi!
The label printers it's my pain :)
Could you check https://github.com/fralx/LimeReport/tree/feature/Custom_size_printing   
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 15, 2020, 12:13:31 PM
Hi Alex,

thank you for your fast reply!

I've try the custom_size_printing branch and attached my best results with some tricks.

1) I have to adjust the margins to center the printed text.

2) Before printing I have to set always the page format on printer properties because every time it lost the "page paper format".
This could be a problem... If possibile, I'd like to force the paper size by code. Is it possibile?

I'm using QT 5.12.7 with VS2017 compiler and QtCreator 4.12.0 (Windows 10)

Thank you so much for your time and support.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: Arin Alex on May 15, 2020, 12:47:03 PM
Try to use setPageSizeToPrinter page property.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 15, 2020, 12:56:30 PM
Hi Alex,
already tried, attached the result.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: Arin Alex on May 15, 2020, 01:04:41 PM
Could you try to play with printerMargin(Left, Top, Right, Bottom) and changePrinterMargins properties?
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 15, 2020, 01:22:26 PM
I'm have done some tests...
put a negative printer top margin like -10 or -100 with or without the changePrinterMargins properties but anything is changed.
Also with positive numbers... no change.
Seems that these properties doesn't works.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 15, 2020, 01:30:22 PM
...instead, as you see in my previous "LimeReport.png" attachment with the "topMargin" and "leftMargin" (highlighted in green in your preview) the printed label respect the values inserted.
But if the number if under the 0... nothing change.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: Arin Alex on May 15, 2020, 01:32:53 PM
Unfortunately, I have no label printer for tests :(.
I am forced to ask you to do some test :) 
Try to use a positive value and changePrinterMargins will it have some effect?
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 15, 2020, 01:56:13 PM
No, It's not a problem at all.
I can do all test that you ask me.

No change also with positive value.
I've tried with 1, 10 and 100. No change.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: Arin Alex on May 15, 2020, 02:48:56 PM
Ok. I need some time to research this problem deeply.   
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 15, 2020, 02:50:53 PM
Of course Alex, take your time.
I'm looking forward to hearing from you.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: Arin Alex on May 15, 2020, 06:36:14 PM
Curious, I've found label printer Zebra S4M and get the next result:
If I check changePrinterMargins and set margins to 0 then the label looks pretty good :)
First label changePrinterMargins checked second not checked
 
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 15, 2020, 08:36:37 PM
Hi Alex,

attached the LimeReport file used for the test and the picture as result (A,B,C,D)

A) changePrinterMargins = false, setPageSizeToPrinter = false
B) changePrinterMargins = true , setPageSizeToPrinter = false
C) changePrinterMargins = true , setPageSizeToPrinter = true
D) changePrinterMargins = false, setPageSizeToPrinter = true

I don't know if it can help to resolve the issue but in my case the labels are aligned horizontally and are not printed in vertically like yours.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 15, 2020, 11:04:15 PM
I've also try to change the value of printerMarginTop or printerMarginBottom but nothing change...
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: Arin Alex on May 16, 2020, 10:57:03 AM
Hi!
Just for the experiment, could you change the page orientation?
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: Arin Alex on May 16, 2020, 11:30:57 AM
Could you check how it will look like?
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 16, 2020, 01:11:55 PM
Hi Alex,
the label5 doesn't print anything... unless I uncheck the fullPage property, in this case I see only the text "top left" and the orientation isn't correct because is set Portrait.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: addebito on May 22, 2020, 11:03:21 AM
The dropPrinterMargins property present in the last version has resolve my problem.
Thank you so much for your time and for your kind support Alex.
Title: Re: DYMO LabelWrite 450 (Custom size label)
Post by: Arin Alex on May 22, 2020, 06:49:47 PM
You are welcome :)