Ubuntu 16.04 (Xenial Xerus) - pdfcrop

Ubuntu 16.04 (Xenial Xerus) - pdfcrop

1. Install pdfcrop

sudo apt-get install texlive-extra-utils

strong@foreverstrong:~$ sudo apt-get update
......
strong@foreverstrong:~$ pdfcrop
The program 'pdfcrop' is currently not installed. You can install it by typing:
sudo apt install texlive-extra-utils
strong@foreverstrong:~$
strong@foreverstrong:~$ sudo apt-get autoremove
[sudo] password for strong: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 602 not upgraded.
strong@foreverstrong:~$  


strong@foreverstrong:~$ sudo apt install texlive-extra-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  fonts-lato fonts-lmodern libfile-homedir-perl libfile-which-perl libkpathsea6 libpotrace0 libptexenc1 libruby2.3 libsynctex1 libtexlua52 libtexluajit2
  libzzip-0-13 lmodern prosper ps2eps rake ruby ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby2.3
  rubygems-integration tex-common texlive-base texlive-binaries texlive-font-utils texlive-generic-recommended texlive-latex-base texlive-latex-base-doc
  texlive-latex-recommended texlive-latex-recommended-doc texlive-pictures texlive-pictures-doc texlive-pstricks texlive-pstricks-doc
Suggested packages:
  ri ruby-dev bundler perl-tk dvipng dvidvi xindy fragmaster purifyeps lacheck chktex latexmk latexdiff psutils libtcltk-ruby texlive-latex-extra dot2tex
  prerex
The following NEW packages will be installed:
  fonts-lato fonts-lmodern libfile-homedir-perl libfile-which-perl libpotrace0 libptexenc1 libruby2.3 libsynctex1 libtexlua52 libtexluajit2 libzzip-0-13
  lmodern prosper ps2eps rake ruby ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby2.3 rubygems-integration tex-common
  texlive-base texlive-binaries texlive-extra-utils texlive-font-utils texlive-generic-recommended texlive-latex-base texlive-latex-base-doc
  texlive-latex-recommended texlive-latex-recommended-doc texlive-pictures texlive-pictures-doc texlive-pstricks texlive-pstricks-doc
The following packages will be upgraded:
  libkpathsea6
1 upgraded, 37 newly installed, 0 to remove and 601 not upgraded.
Need to get 186 MB/376 MB of archives.
After this operation, 615 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 texlive-pictures-doc all 2015.20160320-1ubuntu0.1 [100 MB]
Get:2 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 texlive-pstricks-doc all 2015.20160320-1 [85.7 MB]                                              
Fetched 70.4 MB in 26min 38s (44.1 kB/s)                                                                                                                    
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package fonts-lato.
(Reading database ... 302606 files and directories currently installed.)
Preparing to unpack .../fonts-lato_2.0-1_all.deb ...
Unpacking fonts-lato (2.0-1) ...
Selecting previously unselected package tex-common.
Preparing to unpack .../tex-common_6.04ubuntu1_all.deb ...
Unpacking tex-common (6.04ubuntu1) ...
Selecting previously unselected package fonts-lmodern.
Preparing to unpack .../fonts-lmodern_2.004.5-1_all.deb ...
Unpacking fonts-lmodern (2.004.5-1) ...
Selecting previously unselected package libfile-which-perl.
Preparing to unpack .../libfile-which-perl_1.19-1_all.deb ...
Unpacking libfile-which-perl (1.19-1) ...
Selecting previously unselected package libfile-homedir-perl.
Preparing to unpack .../libfile-homedir-perl_1.00-1_all.deb ...
Unpacking libfile-homedir-perl (1.00-1) ...
Preparing to unpack .../libkpathsea6_2015.20160222.37495-1ubuntu0.1_amd64.deb ...
Unpacking libkpathsea6:amd64 (2015.20160222.37495-1ubuntu0.1) over (2015.20160222.37495-1) ...
Selecting previously unselected package libpotrace0.
Preparing to unpack .../libpotrace0_1.13-2_amd64.deb ...
Unpacking libpotrace0 (1.13-2) ...
Selecting previously unselected package libptexenc1:amd64.
Preparing to unpack .../libptexenc1_2015.20160222.37495-1ubuntu0.1_amd64.deb ...
Unpacking libptexenc1:amd64 (2015.20160222.37495-1ubuntu0.1) ...
Selecting previously unselected package libsynctex1:amd64.
Preparing to unpack .../libsynctex1_2015.20160222.37495-1ubuntu0.1_amd64.deb ...
Unpacking libsynctex1:amd64 (2015.20160222.37495-1ubuntu0.1) ...
Selecting previously unselected package libtexlua52:amd64.
Preparing to unpack .../libtexlua52_2015.20160222.37495-1ubuntu0.1_amd64.deb ...
Unpacking libtexlua52:amd64 (2015.20160222.37495-1ubuntu0.1) ...
Selecting previously unselected package libtexluajit2:amd64.
Preparing to unpack .../libtexluajit2_2015.20160222.37495-1ubuntu0.1_amd64.deb ...
Unpacking libtexluajit2:amd64 (2015.20160222.37495-1ubuntu0.1) ...
Selecting previously unselected package libzzip-0-13:amd64.
Preparing to unpack .../libzzip-0-13_0.13.62-3ubuntu0.16.04.2_amd64.deb ...
Unpacking libzzip-0-13:amd64 (0.13.62-3ubuntu0.16.04.2) ...
Selecting previously unselected package lmodern.
Preparing to unpack .../lmodern_2.004.5-1_all.deb ...
Unpacking lmodern (2.004.5-1) ...
Selecting previously unselected package texlive-binaries.
Preparing to unpack .../texlive-binaries_2015.20160222.37495-1ubuntu0.1_amd64.deb ...
Unpacking texlive-binaries (2015.20160222.37495-1ubuntu0.1) ...
Selecting previously unselected package texlive-base.
Preparing to unpack .../texlive-base_2015.20160320-1ubuntu0.1_all.deb ...
Unpacking texlive-base (2015.20160320-1ubuntu0.1) ...
Selecting previously unselected package texlive-latex-base.
Preparing to unpack .../texlive-latex-base_2015.20160320-1ubuntu0.1_all.deb ...
Unpacking texlive-latex-base (2015.20160320-1ubuntu0.1) ...
Selecting previously unselected package texlive-latex-recommended.
Preparing to unpack .../texlive-latex-recommended_2015.20160320-1ubuntu0.1_all.deb ...
Unpacking texlive-latex-recommended (2015.20160320-1ubuntu0.1) ...
Selecting previously unselected package texlive-pictures.
Preparing to unpack .../texlive-pictures_2015.20160320-1ubuntu0.1_all.deb ...
Unpacking texlive-pictures (2015.20160320-1ubuntu0.1) ...
Selecting previously unselected package texlive-generic-recommended.
Preparing to unpack .../texlive-generic-recommended_2015.20160320-1ubuntu0.1_all.deb ...
Unpacking texlive-generic-recommended (2015.20160320-1ubuntu0.1) ...
Selecting previously unselected package texlive-pstricks.
Preparing to unpack .../texlive-pstricks_2015.20160320-1_all.deb ...
Unpacking texlive-pstricks (2015.20160320-1) ...
Selecting previously unselected package prosper.
Preparing to unpack .../prosper_1.00.4+cvs.2007.05.01-4_all.deb ...
Unpacking prosper (1.00.4+cvs.2007.05.01-4) ...
Selecting previously unselected package ps2eps.
Preparing to unpack .../ps2eps_1.68+binaryfree-1_amd64.deb ...
Unpacking ps2eps (1.68+binaryfree-1) ...
Selecting previously unselected package rubygems-integration.
Preparing to unpack .../rubygems-integration_1.10_all.deb ...
Unpacking rubygems-integration (1.10) ...
Selecting previously unselected package ruby-did-you-mean.
Preparing to unpack .../ruby-did-you-mean_1.0.0-2_all.deb ...
Unpacking ruby-did-you-mean (1.0.0-2) ...
Selecting previously unselected package ruby-minitest.
Preparing to unpack .../ruby-minitest_5.8.4-2_all.deb ...
Unpacking ruby-minitest (5.8.4-2) ...
Selecting previously unselected package ruby-net-telnet.
Preparing to unpack .../ruby-net-telnet_0.1.1-2_all.deb ...
Unpacking ruby-net-telnet (0.1.1-2) ...
Selecting previously unselected package ruby-power-assert.
Preparing to unpack .../ruby-power-assert_0.2.7-1_all.deb ...
Unpacking ruby-power-assert (0.2.7-1) ...
Selecting previously unselected package ruby-test-unit.
Preparing to unpack .../ruby-test-unit_3.1.7-2_all.deb ...
Unpacking ruby-test-unit (3.1.7-2) ...
Selecting previously unselected package libruby2.3:amd64.
Preparing to unpack .../libruby2.3_2.3.1-2~16.04.12_amd64.deb ...
Unpacking libruby2.3:amd64 (2.3.1-2~16.04.12) ...
Selecting previously unselected package ruby2.3.
Preparing to unpack .../ruby2.3_2.3.1-2~16.04.12_amd64.deb ...
Unpacking ruby2.3 (2.3.1-2~16.04.12) ...
Selecting previously unselected package ruby.
Preparing to unpack .../ruby_1%3a2.3.0+1_all.deb ...
Unpacking ruby (1:2.3.0+1) ...
Selecting previously unselected package rake.
Preparing to unpack .../archives/rake_10.5.0-2_all.deb ...
Unpacking rake (10.5.0-2) ...
Selecting previously unselected package texlive-extra-utils.
Preparing to unpack .../texlive-extra-utils_2015.20160320-1_all.deb ...
Unpacking texlive-extra-utils (2015.20160320-1) ...
Selecting previously unselected package texlive-font-utils.
Preparing to unpack .../texlive-font-utils_2015.20160320-1_all.deb ...
Unpacking texlive-font-utils (2015.20160320-1) ...
Selecting previously unselected package texlive-latex-base-doc.
Preparing to unpack .../texlive-latex-base-doc_2015.20160320-1ubuntu0.1_all.deb ...
Unpacking texlive-latex-base-doc (2015.20160320-1ubuntu0.1) ...
Selecting previously unselected package texlive-latex-recommended-doc.
Preparing to unpack .../texlive-latex-recommended-doc_2015.20160320-1ubuntu0.1_all.deb ...
Unpacking texlive-latex-recommended-doc (2015.20160320-1ubuntu0.1) ...
Selecting previously unselected package texlive-pictures-doc.
Preparing to unpack .../texlive-pictures-doc_2015.20160320-1ubuntu0.1_all.deb ...
Unpacking texlive-pictures-doc (2015.20160320-1ubuntu0.1) ...
Selecting previously unselected package texlive-pstricks-doc.
Preparing to unpack .../texlive-pstricks-doc_2015.20160320-1_all.deb ...
Unpacking texlive-pstricks-doc (2015.20160320-1) ...
Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 2 added doc-base files...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
/sbin/ldconfig.real: /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudnn.so.6 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libcudnn.so.6 is not a symbolic link

Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up fonts-lato (2.0-1) ...
Setting up tex-common (6.04ubuntu1) ...
update-language: texlive-base not installed and configured, doing nothing!
Setting up fonts-lmodern (2.004.5-1) ...
Setting up libfile-which-perl (1.19-1) ...
Setting up libfile-homedir-perl (1.00-1) ...
Setting up libkpathsea6:amd64 (2015.20160222.37495-1ubuntu0.1) ...
Setting up libpotrace0 (1.13-2) ...
Setting up libptexenc1:amd64 (2015.20160222.37495-1ubuntu0.1) ...
Setting up libsynctex1:amd64 (2015.20160222.37495-1ubuntu0.1) ...
Setting up libtexlua52:amd64 (2015.20160222.37495-1ubuntu0.1) ...
Setting up libtexluajit2:amd64 (2015.20160222.37495-1ubuntu0.1) ...
Setting up libzzip-0-13:amd64 (0.13.62-3ubuntu0.16.04.2) ...
Setting up lmodern (2.004.5-1) ...
Setting up texlive-binaries (2015.20160222.37495-1ubuntu0.1) ...
update-alternatives: using /usr/bin/xdvi-xaw to provide /usr/bin/xdvi.bin (xdvi.bin) in auto mode
update-alternatives: using /usr/bin/bibtex.original to provide /usr/bin/bibtex (bibtex) in auto mode
Setting up texlive-base (2015.20160320-1ubuntu0.1) ...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST... 
mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN... 
mktexlsr: Updating /var/lib/texmf/ls-R... 
mktexlsr: Done.
/usr/bin/tl-paper: setting paper size for dvips to a4.
/usr/bin/tl-paper: setting paper size for dvipdfmx to a4.
/usr/bin/tl-paper: setting paper size for xdvi to a4.
/usr/bin/tl-paper: setting paper size for pdftex to a4.
/usr/bin/tl-paper: setting paper size for dvipdfmx to letter.
/usr/bin/tl-paper: setting paper size for dvips to letter.
/usr/bin/tl-paper: setting paper size for pdftex to letter.
/usr/bin/tl-paper: setting paper size for xdvi to letter.
Setting up texlive-latex-base (2015.20160320-1ubuntu0.1) ...
Setting up texlive-latex-recommended (2015.20160320-1ubuntu0.1) ...
Setting up texlive-pictures (2015.20160320-1ubuntu0.1) ...
Setting up texlive-generic-recommended (2015.20160320-1ubuntu0.1) ...
Setting up texlive-pstricks (2015.20160320-1) ...
Setting up prosper (1.00.4+cvs.2007.05.01-4) ...
Regenerating '/var/lib/texmf/fmtutil.cnf-DEBIAN'... done.
Regenerating '/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST'... done.
update-fmtutil has updated the following file(s):
	/var/lib/texmf/fmtutil.cnf-DEBIAN
	/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST
If you want to activate the changes in the above file(s),
you should run fmtutil-sys or fmtutil.
Running mktexlsr. This may take some time... done.
Setting up ps2eps (1.68+binaryfree-1) ...
Setting up rubygems-integration (1.10) ...
Setting up ruby-did-you-mean (1.0.0-2) ...
Setting up ruby-minitest (5.8.4-2) ...
Setting up ruby-net-telnet (0.1.1-2) ...
Setting up ruby-power-assert (0.2.7-1) ...
Setting up ruby-test-unit (3.1.7-2) ...
Setting up texlive-extra-utils (2015.20160320-1) ...
Setting up texlive-font-utils (2015.20160320-1) ...
Setting up texlive-latex-base-doc (2015.20160320-1ubuntu0.1) ...
Setting up texlive-latex-recommended-doc (2015.20160320-1ubuntu0.1) ...
Setting up texlive-pictures-doc (2015.20160320-1ubuntu0.1) ...
Setting up texlive-pstricks-doc (2015.20160320-1) ...
Setting up libruby2.3:amd64 (2.3.1-2~16.04.12) ...
Setting up ruby2.3 (2.3.1-2~16.04.12) ...
Setting up ruby (1:2.3.0+1) ...
Setting up rake (10.5.0-2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
/sbin/ldconfig.real: /usr/local/cuda-8.0/targets/x86_64-linux/lib/libcudnn.so.6 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libcudnn.so.6 is not a symbolic link

Processing triggers for tex-common (6.04ubuntu1) ...
Running updmap-sys. This may take some time... done.
Running mktexlsr /var/lib/texmf ... done.
Building format(s) --all.
	This may take some time... done.
strong@foreverstrong:~$ 


strong@foreverstrong:~$ pdfcrop
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
Syntax:   pdfcrop [options] <input[.pdf]> [output file]
Function: Margins are calculated and removed for each page in the file.
Options:                                                       (defaults:)
  --help              print usage
  --version           print version number
  --(no)verbose       verbose printing                         (false)
  --(no)debug         debug informations                       (false)
  --gscmd <name>      call of ghostscript                      (gs)
  --pdftex | --xetex | --luatex
                      use pdfTeX | use XeTeX | use LuaTeX      (pdftex)
  --pdftexcmd <name>  call of pdfTeX                           (pdftex)
  --xetexcmd <name>   call of XeTeX                            (xetex)
  --luatexcmd <name>  call of LuaTeX                           (luatex)
  --margins "<left> <top> <right> <bottom>"                    (0 0 0 0)
                      add extra margins, unit is bp. If only one number is
                      given, then it is used for all margins, in the case
                      of two numbers they are also used for right and bottom.
  --(no)clip          clipping support, if margins are set     (false)
                      (not available for --xetex)
  --(no)hires         using `%%HiResBoundingBox'               (false)
                      instead of `%%BoundingBox'
  --(no)ini           use iniTeX variant of the TeX compiler   (false)
Expert options:
  --restricted        turn on restricted mode                  (false)
  --papersize <foo>   parameter for gs's -sPAPERSIZE=<foo>,
                      use only with older gs versions <7.32    ()
  --resolution <xres>x<yres>                                   ()
  --resolution <res>  pass argument to ghostscript's option -r
                      Example: --resolution 72
  --bbox "<left> <bottom> <right> <top>"                       ()
                      override bounding box found by ghostscript
                      with origin at the lower left corner
  --bbox-odd          Same as --bbox, but for odd pages only   ()
  --bbox-even         Same as --bbox, but for even pages only  ()
  --pdfversion <1.x> | auto | none
                      Set the PDF version to 1.x, 1 < x < 8.
                      If `auto' is given as value, then the
                      PDF version is taken from the header
                      of the input PDF file.
                      An empty value or `none' uses the
                      default of the TeX engine.               (auto)

Input file: If the name is `-', then the standard input is used and
  the output file name must be explicitly given.
Examples:
  pdfcrop --margins 10 input.pdf output.pdf
  pdfcrop --margins '5 10 5 20' --clip input.pdf output.pdf
In case of errors:
  Try option --verbose first to get more information.
In case of bugs:
  Please, use option --debug for bug reports.
strong@foreverstrong:~$

猜你喜欢

转载自blog.csdn.net/chengyq116/article/details/93422023