Issue 127579 - PrintOrientation on star basic macro does not work
Summary: PrintOrientation on star basic macro does not work
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: App Dev
Classification: Unclassified
Component: vba (show other issues)
Version: 4.1.3
Hardware: PC Linux 64-bit
: P5 (lowest) Normal
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: automation_bug
Depends on:
Blocks:
 
Reported: 2017-11-02 08:25 UTC by Franz Beck
Modified: 2017-12-08 19:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Basic code doing the printing (132.41 KB, image/png)
2017-11-02 08:25 UTC, Franz Beck
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Franz Beck 2017-11-02 08:25:22 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:
Comment 1 Franz Beck 2017-11-02 08:36:26 UTC
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.
Comment 2 oooforum (fr) 2017-11-03 07:50:48 UTC
Did you try to use cups-pdf?
Is the generated PDF similar as printing document?
Comment 3 Franz Beck 2017-11-04 13:11:47 UTC
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!
Comment 4 Franz Beck 2017-11-06 12:22:22 UTC
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
Comment 5 oooforum (fr) 2017-11-06 13:44:07 UTC
(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.
Comment 6 mroe 2017-11-06 17:47:22 UTC
(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
Comment 7 mroe 2017-11-07 10:11:04 UTC
(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?
Comment 8 oooforum (fr) 2017-12-06 11:05:07 UTC
No news from OP since +30 days

Feel free to reopen after trying cups-pdf