[Solved] How to print current page ?

Discuss the word processor
Post Reply
bluegroper
Posts: 13
Joined: Wed Mar 07, 2018 11:43 am
Location: Somewhere between insomnia and insanity, Au

[Solved] How to print current page ?

Post by bluegroper »

Most office suites appear to have an option to "Print Current Page" in their printer dialog boxes.
Printing just the current page from OO seems unnecessarily clumsy.
Could this omission of a "Current Page" option in the printer dialog be a design oversight ?
Is this a deliberate "feature" or should this be listed as a bug ?
Last edited by Hagar Delest on Thu May 24, 2018 10:05 pm, edited 1 time in total.
Reason: tagged [Solved].
LibreOffice 6.x, on BOTH Windoze 10 and CentOS 7 (KDE)
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: How to print current page ?

Post by keme »

It may be a deliberate decision. I don't know. Possible reasoning:

As I see it, "current page" is the place you are editing, i.e. the page where the insertion point (cursor) is. View can be scrolled independently of the insertion point, so you may be looking at page 15 while the insertion point is at page 42. Which page should be output from "print current page"?

Taking it a step further, scrolled view can contain parts of several pages, and even several full pages if you set a low zoom factor. Again, which page should be output?

Requiring the user to explicitly state page number for printing a single page may seem cumbersome, but it may also avoid a few misprints.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to print current page ?

Post by John_Ha »

bluegroper wrote:Is this a deliberate "feature" or should this be listed as a bug ?
A deliberate feature. It is not a bug which is "something which used to work but does not work now".

Either key in the page number, or highlight the page and choose Print Selection.

Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: How to print current page ?

Post by Zizi64 »

Printing just the current page from OO seems unnecessarily clumsy.
Could this omission of a "Current Page" option in the printer dialog be a design oversight ?
Is this a deliberate "feature" or should this be listed as a bug ?
The print dialog of the LibreOffice (tested in my 5.4.7 version) shows the page number of the current page in the second item.
Print_current_page.png
You must select it only, not needed adjust the number.

My tip is:
Try the LibreOffice
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to print current page ?

Post by John_Ha »

Zizi64 wrote:The print dialog of the LibreOffice (tested in my 5.4.7 version) shows the page number of the current page in the second item.

You must select it only, not needed adjust the number.

My tip is: Try the LibreOffice
That's because you only have one page in your document - AOO is the same. Now try it with two pages ... :D
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: How to print current page ?

Post by Zizi64 »

That's because you only have one page in your document
Absolutely not.
See the screensot above. The forced Page break is shown on the picture. (I am using the dialogs of the LibreOffice.)

Here a more informative picture (the cursor is in the second page):
Print_current_page_LO.png
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to print current page ?

Post by John_Ha »

OK - it's different in LO!
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
bluegroper
Posts: 13
Joined: Wed Mar 07, 2018 11:43 am
Location: Somewhere between insomnia and insanity, Au

Re: How to print current page ?

Post by bluegroper »

Thanks for all the comments above. Much appreciated.
In summary, we think the LO printing solution is superior to OO. Its an irritation to manually select the current page, identified by location of cursor.
AFAIK MS Word also lets user print the current page (based on location of cursor).
Despite this shortcoming, we'll not be rushing to changeover to LO, since ATM there's some other minor features of OO that we prefer.
Many pros and cons of LO vs OO. Any decision is a balance between all of them.
LibreOffice 6.x, on BOTH Windoze 10 and CentOS 7 (KDE)
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: How to print current page ?

Post by Zizi64 »

AFAIK MS Word also lets user print the current page (based on location of cursor).
You can write (but not record) a macro for this task in AOO or LO.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
bluegroper
Posts: 13
Joined: Wed Mar 07, 2018 11:43 am
Location: Somewhere between insomnia and insanity, Au

Re: How to print current page ?

Post by bluegroper »

Zizi64 wrote:
AFAIK MS Word also lets user print the current page (based on location of cursor).
You can write (but not record) a macro for this task in AOO or LO.
Thats exactly where I want to take this. (How did you know ? Perhaps its a common use case.)
For years I had an MS Word macro to print the current page directly to the default printer using all default settings. No interruptions, just print the single page.

Clearly I'm going to need to learn about writing (not just recording) macros in OO.
Pleases and thankyous for any tips or clues that will take me successfully in this direction so that I can overcome this printing issue.
LibreOffice 6.x, on BOTH Windoze 10 and CentOS 7 (KDE)
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: How to print current page ?

Post by Zizi64 »

Download and study Andrew Pitonyak's free macro books.
http://www.pitonyak.org/oo.php



Maybe these topics will help you:

First you need get the number of the actual page...
viewtopic.php?f=45&t=65434
viewtopic.php?f=20&t=68293
viewtopic.php?f=20&t=13704

..then you need control the print procedure
http://ooo-forums.apache.org/en/forum/v ... 3&p=160780
https://ask.libreoffice.org/en/question ... fic-sheet/

(The sample codes was written in various programming languages, but the calling of the API functions are similar. You need study the API functions first, then you will able to write your code in your preferred language (what are supported by the AOO/LO).)
Last edited by Zizi64 on Thu May 24, 2018 11:47 am, edited 2 times in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
bluegroper
Posts: 13
Joined: Wed Mar 07, 2018 11:43 am
Location: Somewhere between insomnia and insanity, Au

Re: How to print current page ?

Post by bluegroper »

Tibor
Thanks so much for your reply.
I've some learning to do, also encouraged by this snippet from the materials you referenced above.

5.6.1. Print Current Page

Code: Select all

Listing 5.8:Print only the current page.
Dim aPrintOps(0) As New com.sun.star.beans.PropertyValue
oDoc = ThisComponent
oVCurs = oDoc.CurrentController.getViewCursor()
aPrintOps(0).Name = "Pages"
aPrintOps(0).Value = trim(str(oVCurs.getPage()))
oDoc.print(aPrintOps())
More thanks and power to you.
LibreOffice 6.x, on BOTH Windoze 10 and CentOS 7 (KDE)
LWH
Posts: 1
Joined: Wed Jul 17, 2019 6:43 pm

Re: [Solved] How to print current page ?

Post by LWH »

I had the same problem. I initially solved it by printing by using "File" "Print" instead of the print button. I then looked into the visable buttons options. The default button is "Print File Directly". Put your mouse over this button and right click and select visable buttons. Scroll down until you get to the two print buttons. Deselect "Print File Directly" and select "Print". This button will only print the active sheet.
Open Office 4
Windows 10
Post Reply