summaryrefslogtreecommitdiff
path: root/PKG-INFO
diff options
context:
space:
mode:
Diffstat (limited to 'PKG-INFO')
-rw-r--r--PKG-INFO78
1 files changed, 75 insertions, 3 deletions
diff --git a/PKG-INFO b/PKG-INFO
index 7553591..9919a51 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,13 +1,16 @@
Metadata-Version: 2.1
Name: img2pdf
-Version: 0.3.3
+Version: 0.3.4
Summary: Convert images to PDF via direct JPEG inclusion.
Home-page: https://gitlab.mister-muffin.de/josch/img2pdf
Author: Johannes 'josch' Schauer
Author-email: josch@mister-muffin.de
License: LGPL
-Download-URL: https://gitlab.mister-muffin.de/josch/img2pdf/repository/archive.tar.gz?ref=0.3.3
-Description: img2pdf
+Download-URL: https://gitlab.mister-muffin.de/josch/img2pdf/repository/archive.tar.gz?ref=0.3.4
+Description: [![Travis Status](https://travis-ci.org/josch/img2pdf.svg?branch=master)](https://travis-ci.org/josch/img2pdf)
+ [![Appveyor Status](https://ci.appveyor.com/api/projects/status/2kws3wkqvi526llj/branch/master?svg=true)](https://ci.appveyor.com/project/josch/img2pdf/branch/master)
+
+ img2pdf
=======
Lossless conversion of raster images to PDF. You should use img2pdf if your
@@ -123,6 +126,24 @@ Description: img2pdf
$ ve/bin/img2pdf -o test.pdf src/tests/test.jpg
+ For Microsoft Windows users, PyInstaller based .exe files are produced by
+ appveyor. If you don't want to install Python before using img2pdf you can head
+ to appveyor and click on "Artifacts" to download the latest version:
+ https://ci.appveyor.com/project/josch/img2pdf
+
+ 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.
+
+ ![](screenshot.png)
+
+ Library
+ -------
+
The package can also be used as a library:
import img2pdf
@@ -147,6 +168,36 @@ Description: img2pdf
with open("name.pdf","wb") as f:
f.write(img2pdf.convert(["test1.jpg", "test2.png"]))
+ # convert all files ending in .jpg inside a directory
+ dirname = "/path/to/images"
+ with open("name.pdf","wb") as f:
+ imgs = []
+ for fname in os.listdir(dirname):
+ if not fname.endswith(".jpg"):
+ continue
+ path = os.path.join(dirname, fname)
+ if os.path.isdir(path):
+ continue
+ imgs.append(path)
+ f.write(img2pdf.convert(imgs))
+
+ # convert all files ending in .jpg in a directory and its subdirectories
+ dirname = "/path/to/images"
+ with open("name.pdf","wb") as f:
+ imgs = []
+ for r, _, f in os.walk(dirname):
+ for fname in f:
+ if not fname.endswith(".jpg"):
+ continue
+ imgs.append(os.path.join(r, fname))
+ f.write(img2pdf.convert(imgs))
+
+
+ # convert all files matching a glob
+ import glob
+ with open("name.pdf","wb") as f:
+ f.write(img2pdf.convert(glob.glob("/path/to/*.jpg")))
+
# writing to file descriptor
with open("name.pdf","wb") as f1, open("test.jpg") as f2:
img2pdf.convert(f2, outputstream=f1)
@@ -215,6 +266,24 @@ Description: img2pdf
4500182 original.png
9318120 pdflatex.pdf
+ Comparison to podofoimg2pdf
+ ---------------------------
+
+ Like pdfLaTeX, podofoimg2pdf is able to perform a lossless conversion from JPEG
+ to PDF by plainly embedding the JPEG data into the pdf container. But just like
+ pdfLaTeX it uses flate compression for all other file formats, thus sometimes
+ resulting in larger files than necessary.
+
+ $ convert logo: -resize 8000x original.png
+ $ podofoimg2pdf out.pdf original.png
+ stat --format="%s %n" original.png out.pdf
+ 4500181 original.png
+ 9335629 out.pdf
+
+ It also only supports JPEG, PNG and TIF as input and lacks many of the
+ convenience features of img2pdf like page sizes, borders, rotation and
+ metadata.
+
Comparison to Tesseract OCR
---------------------------
@@ -226,6 +295,7 @@ Description: img2pdf
input to RGB and removes the alpha channel from images with transparency. For
multipage TIFF or animated GIF, it will only convert the first frame.
+
Keywords: jpeg pdf converter
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
@@ -242,4 +312,6 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
+Description-Content-Type: text/markdown
+Provides-Extra: gui
Provides-Extra: test