App-PDFUtils
view release on metacpan or search on metacpan
script/compress-pdf view on Meta::CPAN
# Note: This script is a CLI for Riap function /App/PDFUtils/compress_pdf
# and generated automatically using Perinci::CmdLine::Gen version 0.502
use 5.010001;
use strict;
use warnings;
use Log::ger;
use Perinci::CmdLine::Any;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2026-02-02'; # DATE
our $DIST = 'App-PDFUtils'; # DIST
our $VERSION = '0.017'; # VERSION
my $cmdline = Perinci::CmdLine::Any->new(
url => "/App/PDFUtils/compress_pdf",
program_name => "compress-pdf",
log => 1,
);
$cmdline->run;
# ABSTRACT: Make PDF smaller
# PODNAME: compress-pdf
__END__
=pod
=encoding UTF-8
=head1 NAME
compress-pdf - Make PDF smaller
=head1 VERSION
This document describes version 0.017 of compress-pdf (from Perl distribution App-PDFUtils), released on 2026-02-02.
=head1 SYNOPSIS
B<compress-pdf> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<compress-pdf> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<compress-pdf> [B<L<--config-path|/"--config-path=s, -c">>=I<path>|B<L<-c|/"--config-path=s, -c">>|B<L<--no-config|/"--no-config, -C">>|B<L<-C|/"--no-config, -C">>] [B<L<--config-profile|/"--config-profile=s, -P">>=I<profile>|B<L<-P|/"--config-profi...
See examples in the L</EXAMPLES> section.
=head1 DESCRIPTION
This utility is a wrapper for L<gs> (GhostScript) and is equivalent to the
following command:
% gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
This wrapper offers support for multiple files and automatically naming output
C<INPUT.compressed.pdf> by default.
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--files-json>=I<s>
See C<--files>.
Can also be specified as the 1st command-line argument and onwards.
=item B<--files>=I<s@>*
(No description)
Can also be specified as the 1st command-line argument and onwards.
Can be specified multiple times.
=item B<--overwrite>, B<-O>
(No description)
=item B<--setting>=I<s>, B<-s>
Default value:
"ebook"
Valid values:
["screen","ebook","prepress","printer","default"]
=back
=head2 Configuration options
=over
=item B<--config-path>=I<s>, B<-c>
Set path to configuration file.
Can actually be specified multiple times to instruct application to read from
multiple configuration files (and merge them).
=item B<--config-profile>=I<s>, B<-P>
Set configuration profile to use.
A single configuration file can contain profiles, i.e. alternative sets of
values that can be selected. For example:
( run in 0.895 second using v1.01-cache-2.11-cpan-f56aa216473 )