How can I change the default selection for page orientation to either "Portrait" or "Landscape" in the Print Dialog box in Writer?

I am trying to have the default selection be “Portrait” instead of “Automatic” when the Print Dialog box is opened. I believe this can be done in the printdialog.ui file, but I’m not certain how to do it. Can anyone help?

So far I have tried to change the order of

item translatable=“yes” context=“printdialog|liststore3”>Automatic

item translatable=“yes” context=“printdialog|liststore3”>Portrait

item translatable=“yes” context=“printdialog|liststore3”>Landscape

to

item translatable=“yes” context=“printdialog|liststore3”>Portrait

item translatable=“yes” context=“printdialog|liststore3”>Automatic

item translatable=“yes” context=“printdialog|liststore3”>Landscape

in

object class=“GtkComboBoxText” id=“pageorientationbox”>

While this displays the word “Portrait” (after changing), it does not seem to display the document in portrait mode in the Print Preview. Changing the above only seems to edit the label. The functionality remains as it was originally. Regardless of the label, the top choice is functioning as automatic, the middle choice is portrait, and the bottom choice is Landscape. Any insight into how to make the default choice function as Portrait would be appreciated.

Thank you.

I wonder what you are trying to achieve?

Hi Earnest. Thanks for your interest in this matter.

In this case, I’m trying to use Writer to create labels on a dedicated computer for that purpose. In order to make the labels print on this printer, I have had to make a template that would by default print in Landscape format, but for this printer to recognize and print the label properly, I have to change the option from Automatic to Portrait in the Print Dialog Box. Not everyone who will be printing the labels has experience with Word Processors etc, so I was trying to get as many of the options preselected as possible.

Can’t you set up the printer in File > Printer setup and save that in the document or the template?

If you are trying to create and print the labels using Basic, or another language, then you might need to re-word the question. As I understand it, your question is: How do I use a macro to print a landscape page to a printer that accepts only Portrait?