LimeReport Forum
General Category | Основное => Discussion | Обсуждение => Topic started 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.
-
Hi!
The label printers it's my pain :)
Could you check https://github.com/fralx/LimeReport/tree/feature/Custom_size_printing
-
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.
-
Try to use setPageSizeToPrinter page property.
-
Hi Alex,
already tried, attached the result.
-
Could you try to play with printerMargin(Left, Top, Right, Bottom) and changePrinterMargins properties?
-
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.
-
...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.
-
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?
-
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.
-
Ok. I need some time to research this problem deeply.
-
Of course Alex, take your time.
I'm looking forward to hearing from you.
-
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
-
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.
-
I've also try to change the value of printerMarginTop or printerMarginBottom but nothing change...
-
Hi!
Just for the experiment, could you change the page orientation?
-
Could you check how it will look like?
-
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.
-
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.
-
You are welcome :)