wget http://ftp.gwdg.de/pub/opensuse/distribution/leap/42.3/repo/oss/suse/x86_64/libgcj48-4.8.5-24.14.x86_64.rpm
Use the CD command, move the terminal to the Downloads folder.
cd ~ / Downloads
Finally, use the DNF package manager to install PDFtk:
sudo dnf install libgcj48-4.8.5-24.14.x86_64.rpm pdftk-2.02-10.1.x86_64.rpm -y
sudo zypper install pdftk
Building PDFtk from source does not take you too much effort because there are already built-in files built into the source directory. To build the program from the source code, you first need to download the code. To get the code, use the wget download tool in the terminal device.
To make sure PDFtk is built correctly, make sure you have GCC, GCJ and libgcj installed on Linux.
wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-src.zip
Next, use the Unzip command to extract the PDFtk Zip folder into the Linux Download folder. If you have not installed the Unzip application, do this to "extract" the zip file and install it.
cd ~ / Downloads
unzip pdftk-2.02-src.zip
Extracting PDFtk will create a folder 'pdftk-2.02-src' in Downloads. In the terminal, use the CD command to enter.
cd pdftk-2.02-src
In the original PDFtk folder, you cannot manipulate much. To compile anything, we need to move the terminal to the subdirectory of PDFtk.
cd pdftk
The PDFtk subdirectory has dozens of dedicated Makefiles that users can use to automatically create different operating systems. Use the LS command, list the contents of the directory.
ls
Look over and find the specific Makefile you need and start the build process with the command below. Remember to change the " Makefile.filename " in the command below with the name of the Makefile you need to use.
make -f Makefile.filename
One of the main attractions of PDFtk is the ability to intervene and split PDF files. For example, to split a PDF file so that each page of the document becomes a separate file, try using the burst command:
pdftk testfile.pdf burst
PDFtk will export split files in the same location as the source file.
If you want to merge all PDF files broken down into a single file, start by renaming the original PDF file (to be safe).
mv testfile.pdf testfile.bak
Now, the tested PDF file is safe, combining everything with PDFtk. First, use the LS command to view the files in the directory.
ls
Next, run the LS command again, but this time use it to store all PDF files.
ls * .pdf >> pdf-filenames.txt
Assign the contents of the file pdf-filenames.txt to the Bash variable. The Bash variable in this case is not simply a wildcard when we join the PDF files but also marks the files in order.
value = $ (
Finally, combine PDF files with PDFtk and $ values.
pdftk $ value cat output recombined-document.pdf
See more: