Solved print/pdfarranger

MasterOne

Active Member

Reaction score: 25
Messages: 193

I was just wondering why there is no print/pdfarranger port for FreeBSD (since even OpenBSD has one):
PDF Arranger is a small python-gtk application, which helps the user to merge or split pdf documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface. It is a frontend for pikepdf.
What I found on their GitHub issue tracker: Installation instructions for FreeBSD #381

BTW Since that one is a GTK3 GUI application, does anyone know of an equivalent that's using QT5 instead?
 
OP
M

MasterOne

Active Member

Reaction score: 25
Messages: 193

Because nobody created one so far 🤷‍♂️
Obviously ;)

But it's always the same questions:
  • Is it of general interest?
  • Is there an already available alternative?
  • Can it even be ported?
  • ...
I'm a regular user with the intention to move from Arch Linux to FreeBSD, so anything like "Why don't you do it yourself?" doesn't really help (my answer would be "I would if I could").

Bringing up interesting software that's worth it to be ported should be in the interest of this sub forum.
 

astyle

Daemon

Reaction score: 461
Messages: 1,073

grahamperrin Very well, so now we ONLY need to fine someone with the necessary skills, time and interest... 🙃
So, how much is that fine? Ok, ok, I'm messing around. But yeah, it looks like you can only choose 2 out of 3. People with actual skill to do something - they don't have the time (and often interest is not there, as well, so you gotta offer a carrot to them). For those of us who only have time and interest - you can either spend that time learning the skill or figuring a different way to get the same project done, with a different tool. Another option is drumming up some support for your idea, submit request through proper channels, etc.
 

Zirias

Son of Beastie

Reaction score: 1,507
Messages: 2,626

The thing for me is: I won't create a port that I won't use. Simple reason, as a port maintainer, you're expected to look after it (react to PRs fixing issues, follow upstream updates, etc). This is much easier to do for a software you use yourself.

But then: porting isn't that hard, and the porter's handbook gets you started very well. Maybe you want to try it yourself anyways? You'd learn something for sure, and maybe you're proud of what you achieved afterwards :)
 

bakul

Active Member

Reaction score: 57
Messages: 119

No GUI but you can use pdf2ps, psselect, ps2pdf & other utilities from the psutils package for a similar purpose.
 
OP
M

MasterOne

Active Member

Reaction score: 25
Messages: 193

I'm not nailed to PDF Arranger, but it really is a nice and easy to use GUI tool for certain tasks, like merging and arranging PDF pages, which would be quite cumbersome to manage from the command line.

If there is an alternative, I'll take a look, if not, I'll probably mess around at the command line (as I already did with a script to split A4 pages vertically into two A5 pages and remove blank pages), and if no one else shows interest and I manage to acquire the necessary skills and time, I'm not averse to look into porting myself.
 

bakul

Active Member

Reaction score: 57
Messages: 119

What you can do is to bring up the pdf in a viewer and write down page numbers in the order you want. There are other tools for printing in a specific order, for example book mode (two up, duplex) where you want to staple the resulting pages in the middle. At least worth getting familiar with these programs!
 
OP
M

MasterOne

Active Member

Reaction score: 25
Messages: 193

Yeah, but nothing beats the simplicity and speed this can be done with with PDF Arranger. I often have to merge two PDF files, rearrange their pages and remove blank pages. With drag & drop and hitting DEL this is done in no time, so there is just no advantage with any other possible solution.
 

Zirias

Son of Beastie

Reaction score: 1,507
Messages: 2,626

Well, another motivation to get to work, reading the porter's handbook, right? *scnr* ;)

It is how it is, every free and opensource system (be it a complete OS like FreeBSD, or "just" a distribution of, for example, GNU/Linux) needs help ;) Get involved!

A few more practical tips if you want to get started:
  • Yep, porter's handbook ist the place to start and it's a good one, but…
  • install ports-mgmt/poudriere and learn how to use it. The testport subcommand is invaluable, and…
  • look around in /usr/ports/Mk. A lot of things not directly covered by the porter's handbook is documented there, in comments.
  • and finally, look for "similar" ports and learn from them. In your case, anything providing a GUI written in python.
 

kpedersen

Son of Beastie

Reaction score: 2,079
Messages: 2,942

Can you not just build it and run it from your home directory? I have loads of software that I can't be bothered to make a port from that I still use.

Go through that programs readme and get it built. You don't need to be a programmer just to type a couple of build commands. Compiling from a tarball is something that any technical user should be able to do. It is a great way to understand about the platform and what software is light / portable, and what software is bad.

It is Python unfortunately, so it probably drags in a stupid number of dependencies, but the commands look simple enough:

Code:
git clone https://github.com/pdfarranger/pdfarranger.git
cd pdfarranger
./setup.py build
python3 -m pdfarranger

Perhaps any compile errors we can help you with.

Edit:

Even easier. Its docs give you a clear FreeBSD guide for installing dependencies and the program from PIP.

Code:
sudo pkg install devel/gettext devel/py-gobject3 devel/py-pip devel/py-python-distutils-extra graphics/poppler-glib textproc/intltool textproc/py-pikepdf x11-toolkits/gtk30

pip3 install --user --upgrade https://github.com/pdfarranger/pdfarranger/zipball/main
 

astyle

Daemon

Reaction score: 461
Messages: 1,073

Code:
Code:
sudo pkg install devel/gettext devel/py-gobject3 devel/py-pip devel/py-python-distutils-extra graphics/poppler-glib textproc/intltool textproc/py-pikepdf x11-toolkits/gtk30

pip3 install --user --upgrade https://github.com/pdfarranger/pdfarranger/zipball/main
Now this kind of stuff - I'd suggest putting it all into a Makefile option, like make --os-type=freebsd
 

tingo

Son of Beastie

Reaction score: 638
Messages: 2,543

pdftk is also in ports, and can do many of the things pdfarranger can.
 
OP
M

MasterOne

Active Member

Reaction score: 25
Messages: 193

pdftk is also in ports, and can do many of the things pdfarranger can.
Not a substitute, some things like this are really better, easier and quicker done in a GUI app. pdftk also does not support the removal of white borders.
 

astyle

Daemon

Reaction score: 461
Messages: 1,073

I think at some point somebody will pull together all those separate functionalities into a coherent GUI to do some basic PDF work. Unfortunately, I do get the impression that if the real McCoy gets wind of that, things will get messy in a hurry.
 
OP
M

MasterOne

Active Member

Reaction score: 25
Messages: 193

I think at some point somebody will pull together all those separate functionalities into a coherent GUI to do some basic PDF work. Unfortunately, I do get the impression that if the real McCoy gets wind of that, things will get messy in a hurry.
Not sure what you mean, but a simple (*) port of print/pdfarranger would already do.

(*) Assuming that it should be rather easy to port that software, since there already is a port for OpenBSD, so likely their Makefile and patch can be used as template.
 
OP
M

MasterOne

Active Member

Reaction score: 25
Messages: 193

Bumping this in hope that someone finds this interesting enough to create a port, because I have found myself using PDF Arranger (on my laptop running Arch Linux) quite a lot nowadays.

For some reasons I have to deal with even more PDF documents now than in the past, and PDF Arranger really is super convenient for merging and arranging PDF pages before storing or printing (faster to handle than having to turn and insert pages into the printer for manual duplex printing with separate PDF dokuments).
 

Alexander88207

Aspiring Daemon

Reaction score: 491
Messages: 706

Port compiles fine and runs for me.

Here are the port files: https://codeberg.org/Alexander88207/FreeBSD-Ports/src/branch/main/print/pdfarranger

Before compiling it, install the dependencies using pkg install devel/py-python-distutils-extra intltool gettext devel/py-dateutil textproc/py-pikepdf to prevent mixing packages with ports.

and for image support (Optional) install py-img2pdf.

Please test it and let me know if something is not working or missing!

If you think everything works as expected i will submit it.

1621962377183.png
 
Top