2021-05-23

189: The Application Foundations '.uno:Print'

<The previous article in this series | The table of contents of this series | The next article in this series>

A UNO dispatch command that prints the document contained in the frame

Topics


About: UNO (Universal Network Objects)
About: LibreOffice
About: Apache OpenOffice

The table of contents of this article


Starting Context


  • The reader has knowledge of what 'UNO dispatch command' is and how to call one (if the URL and the arguments of the command are clear).

Target Context


  • The reader will know the specifications of the UNO dispatch command.

Orientation


There are some articles that explain how to execute any UNO dispatch commands and get the whole available information from the execution, in Java, in C++, in C#, in Python, and in LibreOffice or Apache OpenOffice Basic.

There are the list for the application foundations, the list for Writer, and the list for Calc of the UNO dispatch commands listed so far in this series.


Main Body


1: The Specifications


URL: .uno:Print

Description: This command prints the document contained in the frame.

Arguments (the types are UNO datum types):

NameTypeValue
PrinterNamestringthe printer name
FileNamestringThis argument does not seem effective.
Copiesshortthe number of copies
RangeTextstringthe pages range text like '1-3,4'
SelectionbooleanThis argument does not seem effective. However, whether only the selection is printed or not can be controlled with the 'RangeText' argument: empty -> only the selection, not empty -> not only the selection (a value like '1-' can be used as a dummy).
Asynchronbooleanwhether the printing is done asynchronously or not
Collatebooleanwhether the printing is collated or not
Silentbooleanwhether the printing is done silently or not

The related information (the value of com.sun.star.frame.FeatureStateEvent.State) (the types are UNO datum types):

TypeValue
N/Avoid

The result information (the value of com.sun.star.frame.DispatchResultEvent.Result) (the type is a UNO datum type):

TypeValue
N/Avoid

<The previous article in this series | The table of contents of this series | The next article in this series>