When I change the printer, the paper size don't change,
thanks
When I change the printer, the paper size don't change,
thanks
There is a method, readprinterproperties you can call. It is intended that it does not change.
I'll try this and I go back to say if it works
doesn't work.
I'm trying:
WPRichText1.ReadPrinterProperties();
WPRichText1.ReformatAll(true, true);
WPRichText1.Print;
If it does not work, this must have other reasons.
This is the code ReadPrinterProperties executes:
Header.Landscape := aPrinter.Orientation = poLandscape;
Header.PageWidth :=
MulDiv(GetDeviceCaps(aPrinter.Handle, PHYSICALWIDTH), 1440,
GetDeviceCaps(aPrinter.Handle, LOGPIXELSX));
Header.PageHeight :=
MulDiv(GetDeviceCaps(aPrinter.Handle, PHYSICALHEIGHT), 1440,
GetDeviceCaps(aPrinter.Handle, LOGPIXELSY));
It is always executed after PrinterSetup.
Sorry, it worked, we solved the problem of paper size,
but we had a side effect on a third printer (Argox os-214)
instead of one label, it started printing 6 labels (1 ok and 5 blanks)
Try to set PrintParameter.Options := [wpDoNotChangePrinterDefaults]
to make sure the printer is used with default options.