https://bugs.documentfoundation.org/show_bug.cgi?id=172478

            Bug ID: 172478
           Summary: Support printing multiple pages over UNO API
           Product: LibreOffice
           Version: 24.2.7.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

There is no documented way to print multiple XPrintable document pages to a
single paper page in the LibreOffice docs
(https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1view_1_1PrintOptions.html)

There is an interface for Writer/text only documents with the XPagePrintable
interface that purportedly supports this
(https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1text_1_1PagePrintSettings.html)
via the PageRows and PageColumns parameters, but actually does nothing.
Steps to reproduce:
- connect to libreoffice via the UNO api with any language (tested with Python)
- open a Writer document and attempt to print by calling
doc.setPagePrintSettings followed by doc.printPages
- the document prints normally but the layout parameters are ignored.

I have attached a python script that does this exactly. The script contains
comments on how it may be used. I have confirmed this behaviour on Ubuntu 24.04
and Windows 10.

Section 5.1 of this printing SDK illustrates the same behaviour:
https://wiki.documentfoundation.org/Documentation/SDKGuide/Printing#5.1._Printing_a_Text_Document
and goes on to say this bug has been known for many years, but I have been
unable to find any bug report that talks about this.
Attempting to do the same thing from the GUI works seamlessly for any type of
document.

Indeed, the lack of the same page layout parameters on the other documents is
itself limiting. Thus, I would suggest that the base XPrintable interface be
extended to support these parameters so that all document types can use print
layouts and without the need to call a seperate doc.printPages.

The fact that the GUI supports all parameters means the functionality required
is already present and implemented. I am prepared to undertake the work needed
to see it done myself, but some pointers in the right direction might be
necessary.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to