I had some progress with this problem. I managed to make script that recombines pages printing order so booklet print ends up with needed result. It is not complete and easy to use but it does work.
Idea of a script is to set printing order for pages in such manner that when printer is set to print booklet order of pages in print is suitable for simple folding. Sadly, default printer has to be set specifically for this purpose each time you want to use script.
I actually gave up trying to solve this using LibreOffice and wrote standalone C# application that does this job.
If someone is interested here is code:
REM
REM Booklet page sort
REM
REM by Predrag Supurovic, http://pedja.supurovic.net
REM
REM Date: 2017-02-13
REM
REM Reorders booklet page printing so pages are simply folded to a book.
REM
REM
REM Usage:
REM
REM - Open document you want to print as booklet
REM - Select printer and setup booklet printing but do not print
REM - Run this macro to print booklet instead of usual booklet printing
REM - As page is printed on both sites fold it adn stack adjacent pages toforma book
REM
REM Hints:
REM - Test with printing to PDF printer first so you can check if everything
REM goes as expected
REM - If you want to repeadetly print the same booklet it is better to print booklet
REM into PDF and then repeadetly print from that PDF
REM
option explicit
dim mDoc as object
dim Props(0) as New com.sun.star.beans.PropertyValue
Sub Main
dim mDocCursor as object
dim mDocPageCount as integer
dim mPrintPageCount as integer
dim mBookletPages as integer
dim i,j as integer
dim mBookletOrder as string
dim mBookletPage1 as integer
dim mBookletPage2 as integer
dim mBookletPage3 as integer
dim mBookletPage4 as integer
dim mPages() as integer
mDoc = thiscomponent
mDocCursor = mDoc.currentcontroller.viewCursor
mDocCursor.jumpToLastPage
mDocPageCount = mDocCursor.getPage()
mBookletPages = INT (mDocPageCount / 4)
if ((mDocPageCount mod 4) = 0) then
mPrintPageCount = mBookletPages * 4
redim mPages(mPrintPageCount) as integer
for i = 1 to mBookletPages
mBookletPage1 = (mBookletPages*4)-(i-1)*2
mPages(mBookletPage1) = (i*4)
mBookletPage2 = (i*2)-1
mPages(mBookletPage2) = (i*4)-3
mBookletPage3 = i*2
mPages(mBookletPage3) = (i*4)-2
mBookletPage4 = (mBookletPages*4)-(i-1)*2-1
mPages(mBookletPage4) = (i*4)-1
next i
mBookletOrder = ""
for j = 1 to mPrintPageCount
if mBookletOrder <> "" then
mBookletOrder = mBookletOrder + ", "
endif
mBookletOrder = mBookletOrder & mPages(j)
next j
Props(0).Name = "Pages"
Props(0).Value = mBookletOrder
mDoc.print(Props())
else
mBookletPages = mBookletPages + 1
msgbox ("Document contains " & mDocPageCount & " pages. " & (mBookletPages)*4 & " pages are required for booklet print." & chr(13) & "Printing aborted!", 0, "Booklet printing error")
endif
end Sub