Apache OpenOffice (AOO) Bugzilla – Issue 127579
PrintOrientation on star basic macro does not work
Last modified: 2017-12-08 19:51:10 UTC
Created attachment 86246 [details] Basic code doing the printing The following basic code is accepted, but the document printed has the wrong orientation. Changing the "PaperOrientation" from LANDSCAPE to PORTRAIT and vice versa has no effect on the printout. ' ---- select the printer PrinterProp(0).name = "Name" PrinterProp(0).value = "Epson-LX-300+" Papersize.Width = 19500 Papersize.Height = 15500 PrinterProp(1).name = "PaperSize" PrinterProp(1).value = Papersize PrinterProp(2).name = "PaperOrientation" PrinterProp(2).value = com.sun.star.view.PaperOrientation.LANDSCAPE odoc.setPrinter(PrinterProp()) Attached are:
Cups specification of the Epson LX-300+ printer on parallel port (via usb to parallel converter) A CUPS blog suggests that there is a OO-issue with the CUPS API My OS: LUbuntu 17.04 64-bit CUPS v. 2.2.2 (Lubuntu 17.04 standard) The problem can be circumvented by adding the (old) Dot-matrix printer as a raw printer, generate an ASCII text file and printing it. That works.
Did you try to use cups-pdf? Is the generated PDF similar as printing document?
No. did not try to use cups-pdf. I generated a standard odt file in Writer and tried to print from BASIC. The printer is an old Epson 9-pin dot-matrix. I will send you the cups declaration as soon as i am back at work. Thanks for your attention!
My Cups setup: Description: Epson-LX-300+ Location: Despatch Device-URI: parallel:/dev/epson Make & Model: Epson LX-300+ Foomatic/epson and under Job-Options: Orientation: Portrait (no rotation) .. Characters per inch: 12.0 Lines per inch: 8.0 ... print-color-mode: monochrome paper-size: custom.195x152mm Notes: The Device-URI is a symbolic link to /dev/usb/lp0 made by udev Make & Model: CUPS offers 2 drivers, both produce the identical result. Orientation - changing from Portrait to Landscape has no effect on the output. And the output has been all the time 90 degree anti-clockwise. Thank you for your attention
(In reply to Franz Beck from comment #3) > No. did not try to use cups-pdf So try it before. Understand that people here have not all printers in the world to test. If the problem still occurs, provide a sample document with this script.
(In reply to Franz Beck from comment #0) > Papersize.Width = 19500 > Papersize.Height = 15500 Maybe simply the size doesn't match to paper-size: custom.195x152mm 19500/100 = 19,5 <> 195 15500/100 = 15,5 <> 152
(In reply to mroe from comment #6) Sorry! (In reply to Franz Beck from comment #0) > Papersize.Width = 19500 Maybe simply the size doesn't match to paper-size: custom.195x152mm Only 15500/100 = 155 <> 152 is correct but maybe the reason for this issue?
No news from OP since +30 days Feel free to reopen after trying cups-pdf