Solved print/pdfarranger

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.

View attachment 9958
Super! But I'm unable to test it because I'm not on FreeBSD yet (still in the preparation phase to move from Arch Linux to FreeBSD 13).

Can anyone else who has been participating in this thread please have a look and give feedback to Alexander88207?
 
… Please test …

The virtual machine that I chose for testing crashed overnight (FreeBSD-provided disk image, swap partition too small). This morning I chose to use pkg to install devel/llvm10. Should speed things up.

PS (off topic), oh:
1622009886829.png

I reset the machine, repaired the UFS file system for the nth time, aimed to test.

It was necessary to remove some packages, then delete and reinstall llvm10, I was surprised by files missing at the time of deletion:
1622011087559.png
 
ModuleNotFoundError: No module named 'gi'
View attachment 9966
Does <https://github.com/pdfarranger/pdfa...ebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R64> help?

After installing devel/py-gobject3, pdfarranger failed with:

ValueError: Namespace Gtk not available

After installing x11-toolkits/gtk30 a different error, which prompted me to install graphics/poppler-glib, after which pdfarranger ran (but I did not test beyond a simple start of the application).

Hello,

thank you for your testing. I have updated the port files accordingly.
 
Test environment:
Code:
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # pkg info -x kde5
kde5-5.21.5.21.04.1
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # pkg info -x poudriere
poudriere-devel-3.3.99.20210521
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # poudriere jail -i -j 13
Jail name:         13
Jail version:      13.0-RELEASE-p1
Jail arch:         amd64
Jail method:       http
Jail mount:        /usr/local/poudriere/jails/13
Jail fs:           zroot/poudriere/jails/13
Jail updated:      2021-05-27 12:57:17
Jail pkgbase:      disabled
root@mowa219-gjp4-vm-freebsd-13-zfs:~ #

poudriere bulk -b latest -j 13 print/pdfarranger

After the build:

Code:
# freebsd-version -kru
13.0-RELEASE-p1
13.0-RELEASE-p1
13.0-RELEASE-p1
# pkg install -y pdfarranger
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
poudriere repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 11 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        libraqm: 0.7.1 [FreeBSD]
        pdfarranger: 1.7.1 [poudriere]
        py38-dateutil: 2.8.1 [poudriere]
        py38-lxml: 4.6.3 [poudriere]
        py38-olefile: 0.46 [poudriere]
        py38-pikepdf: 2.12.0 [poudriere]
        py38-pillow: 8.2.0 [poudriere]
        py38-tkinter: 3.8.10_6 [poudriere]
        qpdf: 10.3.2 [poudriere]
        tcl86: 8.6.11_1 [FreeBSD]
        tk86: 8.6.11_2 [FreeBSD]

Number of packages to be installed: 11

The process will require 35 MiB more space.
[1/11] Installing tcl86-8.6.11_1...
[1/11] Extracting tcl86-8.6.11_1: 100%
[2/11] Installing tk86-8.6.11_2...
[2/11] Extracting tk86-8.6.11_2: 100%
[3/11] Installing py38-tkinter-3.8.10_6...
[3/11] Extracting py38-tkinter-3.8.10_6: 100%
[4/11] Installing libraqm-0.7.1...
[4/11] Extracting libraqm-0.7.1: 100%
[5/11] Installing py38-olefile-0.46...
[5/11] Extracting py38-olefile-0.46: 100%
[6/11] Installing qpdf-10.3.2...
[6/11] Extracting qpdf-10.3.2: 100%
[7/11] Installing py38-pillow-8.2.0...
[7/11] Extracting py38-pillow-8.2.0: 100%
[8/11] Installing py38-lxml-4.6.3...
[8/11] Extracting py38-lxml-4.6.3: 100%
[9/11] Installing py38-pikepdf-2.12.0...
[9/11] Extracting py38-pikepdf-2.12.0: 100%
[10/11] Installing py38-dateutil-2.8.1...
[10/11] Extracting py38-dateutil-2.8.1: 100%
[11/11] Installing pdfarranger-1.7.1...
[11/11] Extracting pdfarranger-1.7.1: 100%
# exit
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # exit
logout
grahamperrin@mowa219-gjp4-vm-freebsd-13-zfs:~ % pdfarranger
grahamperrin@mowa219-gjp4-vm-freebsd-13-zfs:~ %

– success (the application ran).
 
Test environment:
Code:
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # pkg info -x kde5
kde5-5.21.5.21.04.1
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # pkg info -x poudriere
poudriere-devel-3.3.99.20210521
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # poudriere jail -i -j 13
Jail name:         13
Jail version:      13.0-RELEASE-p1
Jail arch:         amd64
Jail method:       http
Jail mount:        /usr/local/poudriere/jails/13
Jail fs:           zroot/poudriere/jails/13
Jail updated:      2021-05-27 12:57:17
Jail pkgbase:      disabled
root@mowa219-gjp4-vm-freebsd-13-zfs:~ #

poudriere bulk -b latest -j 13 print/pdfarranger

After the build:

Code:
# freebsd-version -kru
13.0-RELEASE-p1
13.0-RELEASE-p1
13.0-RELEASE-p1
# pkg install -y pdfarranger
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
poudriere repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 11 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        libraqm: 0.7.1 [FreeBSD]
        pdfarranger: 1.7.1 [poudriere]
        py38-dateutil: 2.8.1 [poudriere]
        py38-lxml: 4.6.3 [poudriere]
        py38-olefile: 0.46 [poudriere]
        py38-pikepdf: 2.12.0 [poudriere]
        py38-pillow: 8.2.0 [poudriere]
        py38-tkinter: 3.8.10_6 [poudriere]
        qpdf: 10.3.2 [poudriere]
        tcl86: 8.6.11_1 [FreeBSD]
        tk86: 8.6.11_2 [FreeBSD]

Number of packages to be installed: 11

The process will require 35 MiB more space.
[1/11] Installing tcl86-8.6.11_1...
[1/11] Extracting tcl86-8.6.11_1: 100%
[2/11] Installing tk86-8.6.11_2...
[2/11] Extracting tk86-8.6.11_2: 100%
[3/11] Installing py38-tkinter-3.8.10_6...
[3/11] Extracting py38-tkinter-3.8.10_6: 100%
[4/11] Installing libraqm-0.7.1...
[4/11] Extracting libraqm-0.7.1: 100%
[5/11] Installing py38-olefile-0.46...
[5/11] Extracting py38-olefile-0.46: 100%
[6/11] Installing qpdf-10.3.2...
[6/11] Extracting qpdf-10.3.2: 100%
[7/11] Installing py38-pillow-8.2.0...
[7/11] Extracting py38-pillow-8.2.0: 100%
[8/11] Installing py38-lxml-4.6.3...
[8/11] Extracting py38-lxml-4.6.3: 100%
[9/11] Installing py38-pikepdf-2.12.0...
[9/11] Extracting py38-pikepdf-2.12.0: 100%
[10/11] Installing py38-dateutil-2.8.1...
[10/11] Extracting py38-dateutil-2.8.1: 100%
[11/11] Installing pdfarranger-1.7.1...
[11/11] Extracting pdfarranger-1.7.1: 100%
# exit
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # exit
logout
grahamperrin@mowa219-gjp4-vm-freebsd-13-zfs:~ % pdfarranger
grahamperrin@mowa219-gjp4-vm-freebsd-13-zfs:~ %

– success (the application ran).

I was about to make one too but you have saved me time, thank you for the test with poudriere, i will submit the port tonight.
 
… i will submit the port tonight.

Big thanks!

In parallel: I'm testing the build on a remote computer in a cleaner environment – FreeBSD-14.0-CURRENT-amd64.vhd.xz from <https://download.freebsd.org/ftp/snapshots/VM-IMAGES/14.0-CURRENT/amd64/Latest/>. Screenshot below.

Drafted:


1622228344134.png

Postscript

Build succeeded, installation (package) succeeded, first run succeeded:

VirtualBox_FreeBSD 14.0-CURRENT_29_05_2021_04_27_12.png


VirtualBox_FreeBSD 14.0-CURRENT_29_05_2021_04_51_19.png


VirtualBox_FreeBSD 14.0-CURRENT_29_05_2021_05_01_33.png
 
… crashed overnight (FreeBSD-provided disk image, swap partition too small). …

Another problem with a FreeBSD-provided image (after the more thorough test of build and installation of print/pdfarranger):

 
MasterOne i do have one question since you work with this mostly:

I am about to add an optional option to the port to add image support by adding py-img2pdf as run dependency:

Now it is used so often or by most that it is worth turning it on as default?
 
MasterOne i do have one question since you work with this mostly: I am about to add an optional option to the port to add image support by adding py-img2pdf as run dependency: Now it is used so often or by most that it is worth turning it on as default?
Cool, I didn't even know that PDF Arranger is capable of adding images as pages, which is why I never tried that before. Certainly useful for not having to convert images to PDF before adding to a PDF document, so I'd say it makes sense to turn that option on by default.
 
If it is really just a runtime dependency for an optional feature, how about not making it a default but instead give a hint in pkg-message?
 
Thank you, everybody, for this nice little port. I compiled the port, and it works great. What a nice nifty tool that works very well.

This isn't solved, though. Why can this not be distributed as a compiled package? Compiling a port was annoying because I had to download an compile 3 python packages and several other packages. And then you have to launch it with python. Like, rly?
 
Code:
sudo pkg install py311-pdfarranger
Mot de passe :
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
All repositories are up to date.
The following 9 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    libimagequant: 4.4.1_3 [FreeBSD-ports]
    py311-deprecated: 1.3.1 [FreeBSD-ports]
    py311-olefile: 0.46_1 [FreeBSD-ports]
    py311-pdfarranger: 1.12.1_1 [FreeBSD-ports]
    py311-pikepdf: 9.9.0_3 [FreeBSD-ports]
    py311-pillow: 11.3.0_2 [FreeBSD-ports]
    py311-tkinter: 3.11.15_11 [FreeBSD-ports]
    py311-wrapt: 1.17.3 [FreeBSD-ports]
    tk86: 8.6.17 [FreeBSD-ports]

Number of packages to be installed: 9

The process will require 19 MiB more space.
4 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/9] Fetching libimagequant-4.4.1_3: 100%   492 KiB 503.7 kB/s    00:01
[2/9] Fetching tk86-8.6.17: 100%  1925 KiB   2.0 MB/s    00:01
[3/9] Fetching py311-pikepdf-9.9.0_3: 100%   651 KiB 666.7 kB/s    00:01
[4/9] Fetching py311-deprecated-1.3.1: 100%    16 KiB  16.9 kB/s    00:01
[5/9] Fetching py311-wrapt-1.17.3: 100%    54 KiB  54.9 kB/s    00:01
[6/9] Fetching py311-pdfarranger-1.12.1_1: 100%   344 KiB 352.1 kB/s    00:01
[7/9] Fetching py311-olefile-0.46_1: 100%    57 KiB  58.5 kB/s    00:01
[8/9] Fetching py311-pillow-11.3.0_2: 100%   893 KiB 914.5 kB/s    00:01
[9/9] Fetching py311-tkinter-3.11.15_11: 100%    25 KiB  25.9 kB/s    00:01
Checking integrity... done (0 conflicting)
[1/9] Installing libimagequant-4.4.1_3...
[1/9] Extracting libimagequant-4.4.1_3: 100%
[2/9] Installing py311-olefile-0.46_1...
[2/9] Extracting py311-olefile-0.46_1: 100%
[3/9] Installing py311-wrapt-1.17.3...
[3/9] Extracting py311-wrapt-1.17.3: 100%
[4/9] Installing py311-deprecated-1.3.1...
[4/9] Extracting py311-deprecated-1.3.1: 100%
[5/9] Installing tk86-8.6.17...
[5/9] Extracting tk86-8.6.17: 100%
[6/9] Installing py311-tkinter-3.11.15_11...
[6/9] Extracting py311-tkinter-3.11.15_11: 100%
[7/9] Installing py311-pillow-11.3.0_2...
[7/9] Extracting py311-pillow-11.3.0_2: 100%
[8/9] Installing py311-pikepdf-9.9.0_3...
[8/9] Extracting py311-pikepdf-9.9.0_3: 100%
[9/9] Installing py311-pdfarranger-1.12.1_1...
[9/9] Extracting py311-pdfarranger-1.12.1_1: 100%
==> Running trigger: gtk-update-icon-cache.ucl
Generating GTK icon cache for /usr/local/share/icons/hicolor
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types

No problem here... FreeBSD-15 with quarterly pkgs...
 
Why can this not be distributed as a compiled package?
Nothing in the port says it cannot be distributed. Doesn't seem to have had any build failures of itself, but perhaps a dependency failed causing it to be skipped. Then it would go 'missing'. Recent builds seem to have been successful though.
 
loveydovey, I'm not familiar with pdfarranger, but there is pdffk which will split and merge pdfs and is available as a package. (all this is being written without knowing if pdfarranger does the same)

For example
Code:
pdftk myfirst.pdf mysecond.pdf output combined.pdf

There's also a burst option, rotate, etc.
 
Back
Top