Page MenuHomeSolus

Initial inclusion of img2pdf
ClosedPublic

Authored by algent on Aug 3 2020, 5:24 PM.

Details

Summary

A new dependency for pdfarranger.

Depends on D9379

Resolve T9225

Signed-off-by: Algent Albrahimi <algent@protonmail.com>

Test Plan
  • Run pdfarranger, drag some JPG and PNG files in the application and save it as PDF.
  • Convert some image files to PDF using cli img2pdf img1.png img2.jpg -o out.pdf.

Diff Detail

Repository
R5053 img2pdf
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

algent created this revision.Aug 3 2020, 5:24 PM
algent requested review of this revision.Aug 3 2020, 5:24 PM
JoshStrobl requested changes to this revision.Aug 5 2020, 4:10 PM
JoshStrobl added a subscriber: JoshStrobl.
This revision now requires changes to proceed.Aug 5 2020, 4:10 PM
algent updated this revision to Diff 22616.Aug 5 2020, 8:20 PM

Add missing dependencies

algent updated this revision to Diff 22617.Aug 5 2020, 8:22 PM
algent edited the summary of this revision. (Show Details)
algent edited the test plan for this revision. (Show Details)

Add more tests

algent added a comment.Aug 5 2020, 8:38 PM

About pikepdf

It uses pikepdf: https://gitlab.mister-muffin.de/josch/img2pdf/blob/master/src/img2pdf.py#L44

python-pikepdf is not yet required in version 0.3.6, but it will be in next release.

About GUI

GUI
There exists an experimental GUI with all settings currently disabled. You can directly convert images to PDF but you cannot set any options via the GUI yet. If you are interested in adding more features to the PDF, please submit a merge request. The GUI is based on tkinter and works on Linux, Windows and MacOS.

GUI is not ready yet, but there is another dependency required to enable the preview in img2pdf-gui app, which is python-pymupdf . This package needs /usr/lib/libmupdf-third.so to be compiled but has been removed from mupdf, see here. But as GUI we can use pdfarranger to convert image files to PDF.

If we're not going to support the GUI then its binary should be removed.

algent added a comment.Aug 5 2020, 9:24 PM

If we're not going to support the GUI then its binary should be removed.

Yes, we can remove it since it is not ready and just experimental. It doesn't have even an icon when it is launched.

algent updated this revision to Diff 22620.Aug 5 2020, 9:32 PM

Remove experimental img2pdf-gui, for now pdfarranger can do the job.

algent edited the test plan for this revision. (Show Details)Aug 5 2020, 9:33 PM
JoshStrobl accepted this revision.Aug 6 2020, 3:56 PM

LGTM, thanks!

This revision is now accepted and ready to land.Aug 6 2020, 3:56 PM
This revision was automatically updated to reflect the committed changes.