Boomaga / boomaga

Boomaga provides a virtual printer for CUPS. This can be used for print preview or for print booklets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Right to left support

Ahmed-E-86 opened this issue · comments

Please, add any option so we can print multi pages in the same page, and a booklet from right to left direction.

and thank your for this amazing program. It's life saving.

I apologize for the long silence, I'm on vacation now. And have some problems with the Internet.
I have 2 questions:

  1. You mean the standard booklet but with the opposite order of the pages?
  2. If job has 3 pages, then in the booklet will be one blank page. In your case this blank page should be the leftmost or rightmost?

Sorry, I didn't know that you answered me.

I mean books in western language, people open it from the left side, but in other language written from right to left (like Arabic), you open the book from the other side (the right side).

So when you print a booklet you need to print in the reverse direction, which means the first page in an English book will be last page in an Arabic book.

How pages should be printed If the sheet is not filled in completely?

For example, we have a document on 5 sheets and use "8 up horizontal" layout.
For Left-to-Right, the position of the pages will be as follows:

...........................
. +---+ +---+ +---+ +---+ .
. | 1 | | 2 | | 3 | | 4 | .
. |   | |   | |   | |   | .
. +---+ +---+ +---+ +---+ .
. +---+                   .
. | 5 |                   .
. |   |                   .
. +---+                   .
...........................

How should it look for Right-to-Left?

I took some pictures from my printer configuration that support right-to-left layout.

Configuration for booklet (Right binding) :

1

Configuration for multi page in 1 (portrait) :

2

Configuration for multi page in (landscape) :

3

I added support for the right-to-left directions in the "right-to-left" branch. It would be great if you would test this version. You can change the direction on the preferences page.
If you have skills you can clone right-to-left branch and to build the project from sources:

git clone https://github.com/Boomaga/boomaga.git --branch right-to-left boomaga
cd boomaga 
mkdir build 
cd build 
cmake 
make 

gui/boomaga

If you haven't such skill, say me what distro you are use I try to build program for you.

I also have a few questions.

  1. Should I change the icons on the "Previous sheet" and "Next sheet" buttons.
  2. Should I change the direction of scrolling on the mouse.

Write me what else I need to change.

cmake ended with an error

CMake Error at CMakeLists.txt:29 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/home/ahmed/boomaga/build/CMakeFiles/CMakeOutput.log".
See also "/home/ahmed/boomaga/build/CMakeFiles/CMakeError.log".

I'm using Linux Mint 18.3.

You need to install the dependencies. Please run the following command:

apt install debhelper dpkg-dev cmake qtbase5-dev qttools5-dev-tools qttools5-dev libcups2-dev libsnappy-dev libpoppler-cpp-dev

This article may also be useful.

Today later I'll install Mint in Virtualbox and build the program for you.

I installed the dependencies, then I could build and run it without any problems.

Everything is working flawlessly.

Booklet / Multi pages / Next sheet and previous sheet buttons works fine.

When I scroll up it goes to the next sheet, and when I scroll down it goes to the previous sheet. I don't know how it suppose to work.

Finally I don't have to switch between Windows and Linux to use my printer.

Thanks man for your efforts, it's really appreciated, and thank you for this life-saving application.

What about the icons on the "previous page" and "next page" buttons? For me it looks like:
screenshot_20180320_143653
Should I swap the icons?

For me, it looks like in this picture

screenshot from 2018-03-20 15-52-59

It's odd for me to be swapped like in your picture.

https://user-images.githubusercontent.com/854935/37652480-b0a088c8-2c4c-11e8-861a-325faa208177.png

Actually all the programs translated into right-to-left languages like Arabic are all swapped like in your picture (All the windows and panels are swapped), and that because of the way the letters are written, and that's why I use all the programs in English to look how it should be.

I'm sorry for asking this. Are you planning to add right-to-left layout option to the main branch in the future or it's going to be a sub branch forever?

Qt contains right-to-left language support. It automatically rotates menus and toolbars for some languages. I started the program with a right-to-left LANG environment variable.

LANG=ar_AE ./gui/boomaga

My idea is - if the interface language is right-to-left, I need to swap the icons on the navigation buttons. If the interface language is left-to-right, the interface remains as-is. Is this correct?

Oh! you are right about this, it's a great idea. 👍

Are you planning to add right-to-left layout option to the main branch

Done d67d150

I'm so happy. Thank you man, and sorry for taking so much time to answer you when you answered me in the first time.

I'm glad.

I have a question about my other program. There is a program flacon, it contains a button "Convert".
screensot. Should I change it for Right-to-Left languages?

No, I think it's ok.

You didn't add right to left support in the main repository, and every time I try to compile from the source as I did before in Linux Mint, I get an error.

And in the last version, I have to rotate the papers before I continue printing on the other side of the paper, otherwise the even pages will be different from the odd pages. I think it's a new bug that doesn't exist before.

Could you please help me Mr/ @SokoloffA ?

You didn't add right to left support in the main repository, and every time I try to compile from the source as I did before in Linux Mint, I get an error.

I added R-to-L support to master branch, see commits on Mar 14 and 16, 2018

If you're talking about No CMAKE_CXX_COMPILLER could be found, then this error isn't related to the source code. You need to install the compiler. For Mint look at my answer above, for Manjaro install devtools, adn dependencies, see the AUR page for the boomaga.

@ahmed-elsayed2017
As I said, R-to-L support is in the master branch. So clone repo like:
git clone https://github.com/Boomaga/boomaga.git boomaga

And in the last version, I have to rotate the papers before I continue printing on the other side of the paper, otherwise the even pages will be different from the odd pages. I think it's a new bug that doesn't exist before.

I don't understand if you don't have a compiler which version you're testing. Please build program from master and test it. If the problem persists, let me know the details.

Or wait a bit, I'll release a new version this week.

@SokoloffA
I compile the program like this :

sudo apt install -y debhelper dpkg-dev cmake qtbase5-dev qttools5-dev-tools qttools5-dev libcups2-dev libsnappy-dev libpoppler-cpp-dev
sudo apt install -y git
git clone https://github.com/Boomaga/boomaga.git --branch right-to-left boomaga
mkdir ~/boomaga/build
cd ~/boomaga/build
cmake ..
make && sudo make install

And I get the error I've told you about before.

I'm using version 1.2.0 which I installed like this :

#(1) To add Boomaga to your system as a PPA:
sudo add-apt-repository ppa:boomaga

#(2) To get Boomaga registered inside your Software Manager as an installable option:
sudo apt-get update

#(3) To install Boomaga to the system. (Give this time it takes a while to do the install.):
sudo apt-get install boomaga

And there is no right-to-left in the preferences :

screenshot from 2018-04-24 20-10-52

And when I choose Print as sub-booklets in the preferences, it doesn't work.

And I have to rotate the odd pages to be in the same side as the even pages.

I haven't released the program in a long time. I'll make a release this week.

I made release.

Ok. Thanks, I will log into Linux_Mint, and try it.

@SokoloffA

Right-to-left exists in the new version.

The same thing happens when printing with double-sided option :

double-sided

If I print 2 pages (double-sided) it will look like what is in this picture, so when I finish printing the even pages, I have to rotate the pages 180 degrees before I press continue to print the odd pages in the same direction.

screenshot from 2018-04-25 22-44-15
Look at this picture. There are 128 pages in this book. In sub-booklets there are also 128 pages, so sub-booklets doesn't help dividing the book into sub-booklets.

Confirm the bug with the rotation of two-sided documents. I will fix it.

About "128 pages" the program divides the document into sub-booklets only when you print the book ("Booklet" layout)

Please create separate issues for different problems.

Ok, thanks.

Boomaga currently prints odd pages first followed by even pages. Is there a way to make it print the even pages first? I need this for my Brother printer so that the completed duplex printing will be sorted correctly. I currently have to flip each page around to get the right order after printing.