Ask Your Question
0

How to make current page printing default in LibreOffice?

asked 2017-06-30 07:00:46 +0100

Br. Sayan gravatar image

updated 2017-06-30 07:02:06 +0100

Is it possible to make current page printing default in LibreOffice writer?

Most of the documents we work with are several pages long, and by default we need to print the only working page. If by mistake a print order is given without selecting the particular page, it would start printing all the pages in the document - say all 700 pages!

So, I'm looking for a way to print only the working page by default.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-06-30 09:01:35 +0100

gabix gravatar image

You can print out just the current page with a simple macro:

Sub PrintCurrentPage
Dim aPrintOps(0) As New com.sun.star.beans.PropertyValue
oDoc = ThisComponent
oViewCursor = oDoc.CurrentController.getViewCursor()
aPrintOps(0).Name = "Pages"
aPrintOps(0).Value = trim(str(oViewCursor.getPage()))
oDoc.print(aPrintOps())

End Sub

The code taken from Andrew Pitonyak's OpenOffice.org Macro document.

edit flag offensive delete link more

Comments

Thank you! Assigned a shortcut key...perfectly working!

Br. Sayan gravatar imageBr. Sayan ( 2017-07-10 15:06:02 +0100 )edit

It's a pretty sad indictment of LO (IMO of course) if the best option for a basic feature like "print current page" is to write a macro. I've been using it since the StarOffice days FWIW.

pbhj gravatar imagepbhj ( 2017-12-07 21:46:53 +0100 )edit

@pbnj: the question was different. Your comment is off-topic.

gabix gravatar imagegabix ( 2017-12-08 08:11:05 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-06-30 07:00:46 +0100

Seen: 173 times

Last updated: Jun 30 '17