Friday, January 20, 2017

Ubuntu - Install Application - PDFTK - tool for manipulating PDF documents



What is PDFTk ?

$ sudo apt-cache search pdftk | grep pdftk
pdftk - tool for manipulating PDF documents
$

Installing PDFTK


$ sudo apt-get install pdftk
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  i965-va-driver libaacs0 libavcodec-ffmpeg56 libavformat-ffmpeg56 libavutil-ffmpeg54 libbdplus0 libbluray1 libcrystalhd3 libdc1394-22 libgme0 libgsm1 libgtkglext1
  libmodplug1 libmp3lame0 libnuma1 libopencv-core2.4v5 libopencv-highgui2.4v5 libopencv-imgproc2.4v5 libopenjpeg5 libschroedinger-1.0-0 libshine3 libsnappy1v5
  libsoxr0 libswresample-ffmpeg1 libswscale-ffmpeg3 libtbb2 libtidy-0.99-0 libtidy5 libtwolame0 libva1 libvdpau1 libx264-148 libx265-79 libxvidcore4 libzvbi-common
  libzvbi0 mesa-vdpau-drivers php7.0 tidy va-driver-all vdpau-driver-all vdpau-va-driver
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  gcj-5-jre-lib libgcj-common libgcj16
Suggested packages:
  libgcj16-dbg libgcj16-awt
The following NEW packages will be installed:
  gcj-5-jre-lib libgcj-common libgcj16 pdftk
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.4 MB of archives.
After this operation, 69.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libgcj-common all 1:4.9.3-9ubuntu1 [149 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 pdftk amd64 2.02-4 [671 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libgcj16 amd64 5.3.1-14ubuntu2 [9,229 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 gcj-5-jre-lib all 5.3.1-14ubuntu2 [10.4 MB]                                                               
Fetched 20.4 MB in 17s (1,199 kB/s)                                                                                                                                   
Selecting previously unselected package libgcj-common.
(Reading database ... 296814 files and directories currently installed.)
Preparing to unpack .../libgcj-common_1%3a4.9.3-9ubuntu1_all.deb ...
Unpacking libgcj-common (1:4.9.3-9ubuntu1) ...
Selecting previously unselected package libgcj16:amd64.
Preparing to unpack .../libgcj16_5.3.1-14ubuntu2_amd64.deb ...
Unpacking libgcj16:amd64 (5.3.1-14ubuntu2) ...
Selecting previously unselected package gcj-5-jre-lib.
Preparing to unpack .../gcj-5-jre-lib_5.3.1-14ubuntu2_all.deb ...
Unpacking gcj-5-jre-lib (5.3.1-14ubuntu2) ...
Selecting previously unselected package pdftk.
Preparing to unpack .../pdftk_2.02-4_amd64.deb ...
Unpacking pdftk (2.02-4) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Setting up libgcj-common (1:4.9.3-9ubuntu1) ...
Setting up libgcj16:amd64 (5.3.1-14ubuntu2) ...
Setting up gcj-5-jre-lib (5.3.1-14ubuntu2) ...
Setting up pdftk (2.02-4) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
$


Check Policy Information Using Apt-Cache Utility in Ubuntu:

$ sudo apt-cache policy pdftk
pdftk:
  Installed: 2.02-4
  Candidate: 2.02-4
  Version table:
 *** 2.02-4 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status
$


Check Show All Information on PDFTK Using Apt-Cache Utility in Ubuntu:

$ sudo apt-cache show pdftk
Package: pdftk
Priority: optional
Section: universe/text
Installed-Size: 2955
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Johann Felix Soden <johfel@debian.org>
Architecture: amd64
Version: 2.02-4
Depends: libc6 (>= 2.14), libgcc1 (>= 1:3.0), libgcj16 (>= 5), libstdc++6 (>= 5.2)
Suggests: xpdf-utils
Filename: pool/universe/p/pdftk/pdftk_2.02-4_amd64.deb
Size: 670504
MD5sum: 352f2c1c310a3e7dafa4c329b303755a
SHA1: 9366c6eb867d5280ebf3ea5e175713d26929948e
SHA256: 70995dff60c4e481060b1fecc4412caf536e6a505a6299db90cdb483cc0f59ad
Description-en: tool for manipulating PDF documents
 If PDF is electronic paper, then PDFtk is an electronic stapler-remover,
 hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. PDFtk is a
 simple tool for doing everyday things with PDF documents. Keep one in the
 top drawer of your desktop and use it to:
  - Merge PDF documents
  - Split PDF pages into a new document
  - Decrypt input as necessary (password required)
  - Encrypt output as desired
  - Fill PDF Forms with FDF Data and/or Flatten Forms
  - Apply a Background Watermark
  - Report PDF on metrics, including metadata and bookmarks
  - Update PDF Metadata
  - Attach Files to PDF Pages or the PDF Document
  - Unpack PDF Attachments
  - Burst a PDF document into single pages
  - Uncompress and re-compress page streams
  - Repair corrupted PDF (where possible)
Description-md5: 2905b599f3411f4e97d4b950ef9c2691
Homepage: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

$


PDFTK: Memory and CPU Usage:


$ ps aux | head -1;ps aux | grep pdftk
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
mhc      20681 97.8  1.2 243780 195876 pts/20  Rl+  16:53   0:11 pdftk A=myMathsHomeWorks.pdf cat A1-12 output chapter1 - Geometry.pdf


PDFTK: Use to Split a PDF File by its page numbers:


$ pdftk A="myMathsHomeWorks.pdf" cat A1-12 output "chapter1 - Geometry.pdf"
$

References: PDFTK: On LaunchPad:

https://launchpad.net/ubuntu/+source/pdftk


No comments:

Post a Comment