GithubHelp home page GithubHelp logo

compress-pdf's People

Contributors

abhishekpc avatar andanotherusername avatar lyzardking avatar shigaraki0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

compress-pdf's Issues

No error message display

In case the program encounters an error and cannot complete the operation, the end user should be informed that the program didn't work.

And error message should be displayed and the users should be encouraged to open a bug report by providing a link to our repository.

Files don't show up in KDE Neon

When I tried to find the files by pressing the button, nothing showed up in any of of my folders. I even tried dragging and dropping but that also didn't worked. At the end, I typed the named of the file and hit entered and then it worked.

Distro: KDE Neon latest version

won't start in ubuntu 18.04

console shows this error message

[6052] Error loading Python lib '/tmp/_MEIlON42o/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/_MEIlON42o/libpython3.7m.so.1.0)

Feature request - Multi file selection

Hi,
Thanks for making the tool available to us.

I have noticed that it is not possible to select multiple files at once .
Could you add this feature?
Once a moth I have to scan tons of paper invoices (at 100dpi) and it would be nice to compress all of them in a shot

Cheers
Palmer

Some improvement suggestions

Thank you for making this tool! :-) Some suggestions:

  1. Remember input directory
  2. Allow saving to a different directory
  3. Success could me just a message in the main window. User shouldn't need to make extra click after all went OK. And success window has no OK button.
  4. Add info how to run it from the source code. Typical location is in README or INSTALL file.
  5. Add installation option (python setup.py)
  6. Move from bash script to python. bash is not common everywhere, python is.
  7. Use consistent file naming (currently: underscores, dashes, camel style)
  8. Use python code quality checker like "black" or "pep8"
  9. Move images to a subdirectory with resources - it will look cleaner.
  10. Allow selection of files with different extension that pdf. pdf is not always pdf :-)
  11. Capture errors from ghostscript. Right now if provided file is not pdf, but has pdf extension user is served with success message even when ghostscript shows error with exit status 1

Does not integrate via AppImageLauncher

I am on Ubuntu 20.04 and the compressor works fine. I tried to integrate it via AppImageLauncher (ver. 2.2.0) but get an error message when doing so "pdf compress Fehler beim Registrieren des AppImages im System via libappimage" (transl: pdf compress error when registering the AppImage in the system via libappimage).

Does this have something to do with AppImageLauncher or with your appimage package?

crashes on Fedora when using file selector button

`./compress-pdf-v0.1-x86_64.AppImage
Qt: Session management error: Authentication Rejected, reason : MIT-MAGIC-COOKIE-1 authentication rejected
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"

(compress-pdf_Qt:259452): Gtk-WARNING **: 11:28:01.972: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/gnome/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/gnome/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Aborted (core dumped)
`

Success Message

At the moment, there is no way for the user to know if the files were compressed or not. There should be a message saying that the compression was successful.

As a future improvements, we can show the compression results on the end screen displaying the initial file size and the output file size and the percentage of compression achieved.

Problem with spaces in filename

If the input filename has spaces in it, the program doesn't work. On the command line, it gives the following error:

`Gtk-Message: 19:02:40.989: GtkDialog mapped without a transient parent. This is discouraged.

Error: /undefinedfilename in (BT)
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:974/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1`

"error loading python lib" & better handling of file names

The AppImage fails to start with the following error:

[14775] Error loading Python lib '/tmp/_MEIMpqDRQ/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/_MEIMpqDRQ/libpython3.7m.so.1.0)

Also, if you name the file with quote pairs, it'll fail to address the file. If I find any other issues, I'll append them here.

Add screenshot

I suggest to add a screenshot of the application to the main readme.
This eases user adoption and is a common element found in program readmes.

Buggy on Manjaro Stable

Thanks for this small app. On Manjaro Stable I get this error:
image
It works if I just "run" the appimage without integrating it into the system. But once I run it, and I try to open a file, the app crashes.

Won't start on Mint 19.3

I have downloaded in from this site but am not able to get it to run on mint 19.3

Here are the errors

[5040] Error loading Python lib '/tmp/_MEIMS58e6/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/_MEIMS58e6/libpython3.7m.so.1.0)

It seems to be related to GLIBC_2.29, while Mint 19.3 has Ubuntu GLIBC 2.27-3ubuntu1.

If I download the source code, I can get it to run by calling in the terminal. So maybe it has to do with how it was packaged?

Update requested for Ubuntu 22.04

The packaged libstdc++.so.6 is incompatible with /lib/x86_64-linux-gnu/libproxy.so.1. GLIBCXX is only up to GLIBCXX_3.4.28 in the appimage, but /lib/x86_64-linux-gnu/libproxy.so.1 seems to require 29 (at least).

I suppose if the Appimage offered an option to use system libraries, instead of packaged ones, it might work, but that would go against the Appimage concept...??

The effect is that you can't load files for compression.

I have been using the application on Ubuntu 22.04, and would like to continue to do so, but I do understand that this is a side-project, and not high priority.

Death to you ItsFOSSgarbage web losers.

Death to you ItsFOSS monkeys, you cheap loser shills. Death to you for letting that idiot use that disgusting 2 letter racist stupid "title" before his first/surname [on that trashy PPA post].

Death to you for being such a stupid slave and openly promoting morons who use that disgusting & racist & childish ego "title". Death to you for promoting those stupid childish ego pigs which you openly promote with those silly & disgusting "titles". Death to you ItsFOSSgarbage web losers.

You're website is utter trash and run by donkeys.
Death to you and death to the garbage and useless so called "health" "sector", and every moron who supports that garbage. You're all nothing but worthless slaves. You have no potential, and are a complete and utter laughable failure. Also death to you for making a intro repo for that "ascii" trash program. Death to every moron who uses that disgusting racist & clownish 3 letter word after "ascii". Death to every idiot who uses the stupid 2-letter "titles" when mentioning first names. Death to "universities" [DUMPSTERversities]. Death to open source.
Death to you ItsFOSS linux clowns. Have a sad life and painful death, losers.

Mechanical Engineering is the ONLY Engineering, period.

Hopefully that loser who used that disgusting 2 letter word before his first/surname will get his throat slit. Burn in agony losers.

Manjaro crashes without error

It appears on the latest version of Manjaro (xfce), this app crashes when I click the file open button:

Manjaro Linux
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=20.2
DISTRIB_CODENAME=Nibia
DISTRIB_DESCRIPTION="Manjaro Linux"
Manjaro Linux
NAME="Manjaro Linux"
ID=manjaro
ID_LIKE=arch
BUILD_ID=rolling
PRETTY_NAME="Manjaro Linux"
ANSI_COLOR="32;1;24;144;200"
HOME_URL="https://manjaro.org/"
DOCUMENTATION_URL="https://wiki.manjaro.org/"
SUPPORT_URL="https://manjaro.org/"
BUG_REPORT_URL="https://bugs.manjaro.org/"
LOGO=manjarolinux

Error executing in Debian Buster - Linux 4.19.0-13-amd64 Debian 4.19.160-2, Gnome 3.30.2, Python 2.7.16-1 and 3.7.3-1, 3.7.3-2+deb10u2

Abhishek:

Well done on your core bash script.

However, the appimage wrapper exhibits the following under:

  • Debian Buster
  • Linux 4.19.0-13-amd64
  • Debian 4.19.160-2
  • Gnome 3.30.2
  • Python 2.7.16-1 and 3.7.3-1, 3.7.3-2+deb10u2
$ ./compress-pdf-v0.1-x86_64.AppImage 
[27366] Error loading Python lib '/tmp/_MEIHwwnJD/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/_MEIHwwnJD/libpython3.7m.so.1.0)
$ uname -a
Linux 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
$ dpkg -l python* | awk '/ii/'
ii  python                               2.7.16-1               amd64        interactive high-level object-oriented language (Python2 version)
ii  python-apsw                          3.24.0-r1-1            amd64        another Python SQLite 3 wrapper
ii  python-apt-common                    1.8.4.3                all          Python interface to libapt-pkg (locales)
ii  python-asn1crypto                    0.24.0-1               all          Fast ASN.1 parser and serializer (Python 2)
ii  python-backports.functools-lru-cache 1.5-3                  all          backport of functools.lru_cache from Python 3.3 to Python 2
ii  python-bs4                           4.7.1-1                all          error-tolerant HTML parser for Python
ii  python-cffi-backend                  1.12.2-1               amd64        Foreign Function Interface for Python calling C code - backend
ii  python-chardet                       3.0.4-3                all          universal character encoding detector for Python2
ii  python-cherrypy3                     8.9.1-2                all          Python web development framework - Python 2 module
ii  python-crypto                        2.6.1-9+b1             amd64        cryptographic algorithms and protocols for Python
ii  python-cryptography                  2.6.1-3+deb10u2        amd64        Python library exposing cryptographic recipes and primitives (Python 2)
ii  python-css-parser                    1.0.4-1                all          CSS related utilities (parsing, serialization, etc) for Python 2
ii  python-cssselect                     1.0.3-1                all          cssselect parses CSS3 Selectors and translates them to XPath 1.0
ii  python-cssutils                      1.0.2-2                all          CSS Cascading Style Sheets parser and builder
ii  python-dateutil                      2.7.3-3                all          powerful extensions to the standard Python datetime module
ii  python-dbus                          1.2.8-3                amd64        simple interprocess messaging system (Python interface)
ii  python-dnspython                     1.16.0-1               all          DNS toolkit for Python
ii  python-enum34                        1.1.6-2                all          backport of Python 3.4's enum package
ii  python-feedparser                    5.2.1-1                all          Universal Feed Parser for Python
ii  python-gi                            3.30.4-1               amd64        Python 2.x bindings for gobject-introspection libraries
ii  python-gpg                           1.12.0-6               amd64        Python interface to the GPGME GnuPG encryption library (Python 2)
ii  python-html2text                     2018.1.9-1             all          Python module for converting HTML to Markdown text
ii  python-html5-parser                  0.4.5-1                amd64        fast, standards compliant, C based, HTML 5 parser for python
ii  python-html5lib                      1.0.1-1                all          HTML parser/tokenizer based on the WHATWG HTML5 specification
ii  python-ipaddress                     1.0.17-1               all          Backport of Python 3 ipaddress module (Python 2)
ii  python-ldb                           2:1.5.1+really1.4.6-3  amd64        Python bindings for LDB
ii  python-libxml2                       2.9.4+dfsg1-7+deb10u1  amd64        Python bindings for the GNOME XML library
ii  python-lxml:amd64                    4.3.2-1+deb10u2        amd64        pythonic binding for the libxml2 and libxslt libraries
ii  python-markdown                      3.0.1-3                all          text-to-HTML conversion library/tool (Python 2 version)
ii  python-mechanize                     1:0.2.5-3              all          stateful programmatic web browsing
ii  python-minimal                       2.7.16-1               amd64        minimal subset of the Python2 language
ii  python-msgpack                       0.5.6-1+b1             amd64        Python implementation of MessagePack format
ii  python-netifaces                     0.10.4-1+b1            amd64        portable network interface information - Python 2.x
ii  python-olefile                       0.46-1                 all          Python module to read/write MS OLE2 files
ii  python-openssl                       19.0.0-1               all          Python 2 wrapper around the OpenSSL library
ii  python-pil:amd64                     5.4.1-2+deb10u2        amd64        Python Imaging Library (Pillow fork)
ii  python-pkg-resources                 40.8.0-1               all          Package Discovery and Resource Access using pkg_resources
ii  python-pygments                      2.3.1+dfsg-1           all          syntax highlighting package written in Python
ii  python-pyparsing                     2.2.0+dfsg1-2          all          alternative to creating and executing simple grammars - Python 2.7
ii  python-pyqt5                         5.11.3+dfsg-1+b3       amd64        Python 2 bindings for Qt5
ii  python-pyqt5.qtsvg                   5.11.3+dfsg-1+b3       amd64        Python 2 bindings for Qt5's SVG module
ii  python-pyqt5.qtwebkit                5.11.3+dfsg-1+b3       amd64        Python 2 bindings for Qt5's WebKit module
ii  python-regex                         0.1.20190207-1         amd64        alternative regular expression module
ii  python-repoze.lru                    0.7-1                  all          tiny LRU cache implementation and decorator
ii  python-routes                        2.4.1-1                all          Routing Recognition and Generation Tools
ii  python-samba                         2:4.9.5+dfsg-5+deb10u1 amd64        Python bindings for Samba
ii  python-simplejson                    3.16.0-1               amd64        simple, fast, extensible JSON encoder/decoder for Python 2.x
ii  python-sip                           4.19.14+dfsg-2         amd64        Python/C++ bindings generator runtime library
ii  python-six                           1.12.0-1               all          Python 2 and 3 compatibility library (Python 2 interface)
ii  python-soupsieve                     1.8+dfsg-1             all          Modern CSS selector implementation for BeautifulSoup (Python 2.7)
ii  python-talloc:amd64                  2.1.14-2               amd64        hierarchical pool based memory allocator - Python bindings
ii  python-tdb                           1.3.16-2+b1            amd64        Python bindings for TDB
ii  python-utidylib                      0.5-2                  all          Python wrapper for TidyLib
ii  python-webencodings                  0.5.1-1                all          Python implementation of the WHATWG Encoding standard
ii  python-webob                         1:1.8.5-1              all          Python module providing WSGI request and response objects (Python 2)
ii  python-yaml                          3.13-2                 amd64        YAML parser and emitter for Python
ii  python2                              2.7.16-1               amd64        interactive high-level object-oriented language (Python2 version)
ii  python2-minimal                      2.7.16-1               amd64        minimal subset of the Python2 language
ii  python2.7                            2.7.16-2+deb10u1       amd64        Interactive high-level object-oriented language (version 2.7)
ii  python2.7-minimal                    2.7.16-2+deb10u1       amd64        Minimal subset of the Python language (version 2.7)
ii  python3                              3.7.3-1                amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-apt                          1.8.4.3                amd64        Python 3 interface to libapt-pkg
ii  python3-brlapi:amd64                 5.6-10+deb10u1         amd64        Braille display access via BRLTTY - Python3 bindings
ii  python3-cairo:amd64                  1.16.2-1+b1            amd64        Python3 bindings for the Cairo vector graphics library
ii  python3-certifi                      2018.8.24-1            all          root certificates for validating SSL certs and verifying TLS hosts (python3)
ii  python3-chardet                      3.0.4-3                all          universal character encoding detector for Python3
ii  python3-cups                         1.9.73-2+b1            amd64        Python3 bindings for CUPS
ii  python3-cupshelpers                  1.5.11-4               all          Python utility modules around the CUPS printing system
ii  python3-dbus                         1.2.8-3                amd64        simple interprocess messaging system (Python 3 interface)
ii  python3-debconf                      1.5.71                 all          interact with debconf from Python 3
ii  python3-debian                       0.1.35                 all          Python 3 modules to work with Debian-related data formats
ii  python3-debianbts                    2.8.2                  all          Python interface to Debian's Bug Tracking System
ii  python3-distro                       1.3.0-1                all          Linux OS platform information API
ii  python3-distro-info                  0.21                   all          information about distributions' releases (Python 3 module)
ii  python3-distutils                    3.7.3-1                all          distutils package for Python 3.x
ii  python3-gi                           3.30.4-1               amd64        Python 3 bindings for gobject-introspection libraries
ii  python3-gi-cairo                     3.30.4-1               amd64        Python 3 Cairo bindings for the GObject library
ii  python3-gpg                          1.12.0-6               amd64        Python interface to the GPGME GnuPG encryption library (Python 3)
ii  python3-gst-1.0                      1.14.4-1+b1            amd64        GStreamer GObject Introspection overrides for Python (Python 3)
ii  python3-httplib2                     0.11.3-2               all          comprehensive HTTP client library written for Python3
ii  python3-idna                         2.6-1                  all          Python IDNA2008 (RFC 5891) handling (Python 3)
ii  python3-lib2to3                      3.7.3-1                all          Interactive high-level object-oriented language (2to3, version 3.6)
ii  python3-louis                        3.8.0-2                all          Python bindings for liblouis
ii  python3-mako                         1.0.7+ds1-1            all          fast and lightweight templating for the Python 3 platform
ii  python3-markupsafe                   1.1.0-1                amd64        HTML/XHTML/XML string library for Python 3
ii  python3-minimal                      3.7.3-1                amd64        minimal subset of the Python language (default python3 version)
ii  python3-numpy                        1:1.16.2-1             amd64        Fast array facility to the Python 3 language
ii  python3-olefile                      0.46-1                 all          Python module to read/write MS OLE2 files
ii  python3-packaging                    19.0-1                 all          core utilities for python3 packages
ii  python3-pexpect                      4.6.0-1                all          Python 3 module for automating interactive applications
ii  python3-pil:amd64                    5.4.1-2+deb10u2        amd64        Python Imaging Library (Python3)
ii  python3-pil.imagetk:amd64            5.4.1-2+deb10u2        amd64        Python Imaging Library - ImageTk Module (Python3)
ii  python3-pkg-resources                40.8.0-1               all          Package Discovery and Resource Access using pkg_resources
ii  python3-ptyprocess                   0.6.0-1                all          Run a subprocess in a pseudo terminal from Python 3
ii  python3-pyatspi                      2.30.0+dfsg-3          all          Assistive Technology Service Provider Interface - Python3 bindings
ii  python3-pycurl                       7.43.0.2-0.1           amd64        Python bindings to libcurl (Python 3)
ii  python3-pyparsing                    2.2.0+dfsg1-2          all          alternative to creating and executing simple grammars - Python 3.x
ii  python3-pyqt5                        5.11.3+dfsg-1+b3       amd64        Python 3 bindings for Qt5
ii  python3-pysimplesoap                 1.16.2-1               all          simple and lightweight SOAP Library (Python 3)
ii  python3-renderpm:amd64               3.5.13-1+deb10u1       amd64        python low level render interface
ii  python3-reportbug                    7.5.3~deb10u1          all          Python modules for interacting with bug tracking systems
ii  python3-reportlab                    3.5.13-1+deb10u1       all          ReportLab library to create PDF documents using Python3
ii  python3-reportlab-accel:amd64        3.5.13-1+deb10u1       amd64        C coded extension accelerator for the ReportLab Toolkit
ii  python3-requests                     2.21.0-1               all          elegant and simple HTTP library for Python3, built for human beings
ii  python3-scour                        0.37-2                 all          SVG scrubber and optimizer (Python 3 module)
ii  python3-sip                          4.19.14+dfsg-2         amd64        Python 3/C++ bindings generator runtime library
ii  python3-six                          1.12.0-1               all          Python 2 and 3 compatibility library (Python 3 interface)
ii  python3-smbc                         1.0.15.6-1+b2          amd64        Python 3 bindings for the Samba client library
ii  python3-socks                        1.6.8+dfsg-1           all          Python 3 SOCKS client module
ii  python3-software-properties          0.96.20.2-2            all          manage the repositories that you install software from
ii  python3-speechd                      0.9.0-5+deb10u1        all          Python interface to Speech Dispatcher
ii  python3-tk:amd64                     3.7.3-1                amd64        Tkinter - Writing Tk applications with Python 3.x
ii  python3-uno                          1:7.0.4~rc2-1~bpo10+2  amd64        Python-UNO bridge
ii  python3-urllib3                      1.24.1-1               all          HTTP library with thread-safe connection pooling for Python3
ii  python3-xdg                          0.25-5                 all          Python 3 library to access freedesktop.org standards
ii  python3.7                            3.7.3-2+deb10u2        amd64        Interactive high-level object-oriented language (version 3.7)
ii  python3.7-minimal                    3.7.3-2+deb10u2        amd64        Minimal subset of the Python language (version 3.7)

Linux packaging

This is not an issue but a feature request.

We should package this software. I suggest AppImage because that's the most suitable format for this small app.

Add a Progress Bar

Please add a progress bar as no indication of what's happening makes me feel it's not working but in fact it was happening in background until a Task Completion Dialog Box appeared.

One more compression level. Enhancement, please.

After running the tool at "Medium" the pdf size did not change. When running it at "High" the size is perfect (from 3Mb to 0.7Mb), but the image quality not so. Something in between would be ideal, even with a little higher size.
Thanks a lot for your work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.