aklomp / shrinkpdf Goto Github PK
View Code? Open in Web Editor NEWShrink PDF files with Ghostscript
Shrink PDF files with Ghostscript
Release version 1.1 when the changes since 1.0 have stabilized.
After issue #1 added support for running shellcheck
in CI, it seems like the script has a few issues. Fix/ignore all of them.
Add a CI pipeline using GitHub Actions.
shellcheck
on every commit to check for common shell-scripting pitfalls.README.md
to PDF with pandoc
or something similar.On a machine where the locale is set to something not equivalent to ASCII, the call to awk
in get_pdf_version()
will throw the following error:
awk: cmd. line:1: (FILENAME=- FNR=1) warning: Invalid multibyte data detected. There may be a mismatch between your data and your locale.
This can be fixed by forcing the C locale by prepending the call to awk
with LC_ALL=C
.
Reported and fixed by Laurent MUGNIER.
Hi there,
I have packaged shrinkpdf for Gentoo:
https://git.sthu.org/?p=shuber-gentoo-overlay.git;a=tree;f=app-text/shrinkpdf;h=66b372e6254652314ed663b3bc180b1135e1cdec;hb=HEAD
Since some commits since last release 1.1 from Jun 2022 appear quite important, I would like to ask whether or when you would tag a new release. This would allow me to provide a Gentoo ebuild not being version 9999, but a specific commit with a proper version name.
Best
Stefan
CI actions should also be run for pull requests.
Hi
I've used a personnal script with more or less same feature. As your code looks better I'll change to it :)
A feature miss in my use cas overwrite option. In many case I assume optimization should be done on the original file. Is it possible to add this behavior ?
Thanks
Currently, the script has the usage signature shrinkpdf.sh [-g|-h] <infile> [outfile] [res]
. The mix of positional arguments and option arguments is a bit messy. Let's replace the optional positional arguments with option flags.
Proposal for the new usage signature: shrinkpdf [-g|-h] <infile> [-o <outfile>] [-r res]
This should be a bit more future proof if new features are added.
Hi
Could be nice to provide a simple debian packaging :)
Experiencing Segmentation Fault (core dumped) error for some PDFs. How to solve?
Adding support for such case would be useful, otherwise handling manually a temporary file is needed
HI @aklomp thanks for this library
Any way/any plan to be able to use absolute url as PDF input file?
So we can use this as API without 'upload'/store the PDF at same location first.
Thanks!
Hello
In try to provide a package version, could be nice to allow configuration.
Following debian logic could be an /etc/default/package file as default configuration.
Followign FHS could be an /etc/shrinkpdf file to overwrite configuration
I've tried to do it with 86bad6d
But if we want not be debian centric, should be a test on /etc/shrinkdpf if present.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.