Welcome to the home page of the PDF tool, a small helper when it comes to manipulating PDF documents. I you want to find out whether the PDF tool fits your needs, you may want to take a look at the Reference section use.html. If it does fit any of your needs, you may want to get the PDF tool. Feel free to get it from the downloads section get.html. If there are any questions regarding the origin and the idea, ../pdftool.html is the way to go. If you want to know what the legal status of the PDF tool and its source is -- you find the license at license.html.
This is how PDF tool describes itself, when asked kindly.
shell$ pdftool The pdftool -- http://ad001.de/pdftool Copyright (c) 2010, 2011, 2012, 2013, 2014, 2017 Andreas Dähn All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Usage: pdftool pdftool -h pdftool --help display this information. pdftool merge -i <infile> -j <appendfile> [-pages <pagespec>] [-o outfile] concatenates the j-infile to the i-infile and writes both to outfile. If given, only pagespec pages from the j-file will be appended. pdftool multimerge <file 1> ... <file n> [-o outfile] concatenates the files 1 to n and writes them to outfile. pdftool delete -i <infile> -pages <pagespec> [-o outfile] [-noconsolidate] deletes the pages pagespec from infile and writes the result to outfile. optionally, it's possible to keep unused objects in the file. pdftool select -i <infile> -pages <pagespec> [-o outfile] [-noconsolidate] takes pagespec pages from infile and writes them to outfile. optionally, it's possible to keep unused objects in the file. pdftool movetofront -i <infile> -pages <pagespec> [-o outfile] moves the given pages to from infile to the front of the document (without reordering them) and writes the result to outfile. pdftool movetoend -i <infile> -pages <pagespec> [-o outfile] moves the given pages to from infile to the end of the document (without reordering them) and writes the result to outfile. pdftool move -i <infile> -pages <pagespec> -position <pagenum> [-o outfile] moves the given oages fro the infile to their new position (without reordering them) and writes the result to outfile. pdftool multiply -i <infile> -page <pagenum> -times <number> [-o outfile] takes the page pagenum from infile and inserts it number times after its original position and writes the result to outfile. pdftool rotate -i <infile> [-pages <pagespec>] [-o outfile] -deg (90|180|270) sets the rotatio marker for pagespec pages from infile and writes the result to outfile. pdftool duration -i <infile> [-pages <pagespec>] [-o outfile] -dur <sec value> sets the duration marker for pagespec pages from infile to sec value and writes the result to outfile pdftool brochure -i <infile> [-upsideonly|-downsideonly] [-reverse] [-o outfile] [-noconsolidate] sorts the pages of infile in order to print a brochure and writes them to outfile. optionally, only the pages for the up- or downside print can be selected and reversed in order a typical application of this command to print a brochure using a one-side-only-printer would be as follows: shell# pdftool brochure -i file.pdf -upsideonly -o upside.pdf print the upside. then, put the resulting paper stack without any turning into the single paper feed (yes, last printed sheet is now to be printed first) shell# pdftool brochure -i file.pdf -downsideonly -reverse -o downside.pdf print the downside. ready. pdftool unlinkpage -i <infile> -pages <pagespec> [-o outfile] Remove all links to specified pages from pageref-tree and write result to outfile pdftool fixunlinkedpages -i <infile> [-o <outfile>] Search for unlinked page objects in infile and link them in pageref-tree Note: Foud pages are appended at the end of the file pdftool readwrite -i <infile> [-o outfile] debug mode: read infile and write to outfile. there should be no damage to the pdf file. pdftool createpdf -o outfile development mode: create a valid pdf file from shell-like input. currently not working. pdftool fixxref -i <infile> [-o outfile] fix a pdf file's xref table. handy in case you want to digg into a pdf file with an arbitrary editor and don't want to do the byte-countig by hand. pdftool splitpageinfo -i <infile> Show page mediabox dimensions of pages within file and make a suggestion for a splitpage parameter set which can be used to find the ideal set. pdftool splitpage -i <infile> -lx i -ly i -lw i -lh i -rx i -ry i -rw i -rh i [-o outfile] Split scanned double pages to single pages. Handy for re-print to electronic read. The given parameters are the Mediabox of right (resp. left) pages which are re-set in the page objects. You may want to use the splitpageinfo conmmand in advance as it provides a set of suggested parameters to the splitpage command. Note: Working of this option strongly relies on how scanned images are embedded to the PDF file by the scanner. pdftool embedfile -i <infile> -j <embedfile> [-k <padfile> [-of offset [-o outfile] Inserts embedfile as object in infile and writes the result to outfile. Optional a third file padfile can be provided to encrypt embedfile using padfile as in the way a one time pad can be used. pdftool will echo the object identifier which will be associated with this embedded file. in order to restore the embedded file, this information will be needed for debed mode. pdftool debedfile -i <infile> -j <targetfile> -id <identifier> [-k <padfile> [-of offset Extracts a file embedded using the pdftool embedfile command from inputfile to targetfile. You need to specify the object identifier which is provided during embedding. Optionally a pad can be provided, it will be used in the mannoar of an one time pad. Note: The source PDF will not be modified; the embedded file will not be removed! where infile is a PDF-File, outfile is some file to write (if not given, 'newfile.pdf' will be created or overwritten), if -noconsolidate is present, unused objects will be kept in the file, pagespec is a single page number (e.g. '1,2,3'), a pagerange (e.g. '1-3'), or a combination of single numbers and ranges (e.g. '1-5,19'), or 'odd' to select all odd pages, or 'even' to select all even pages.
If you feel like contributing to the pdftool, great. However, since I'm not having the time to "manage" a project and I decided not to put my code on hipster-SourceForge1... oh well.
Plain and simple, I'm a grumpy guy. Feel free to get in touch with me. But if your "suggestion" is "your coding style sucks and your code design is not suitable" -- yeah, go
fork() yourself. Of course it's a witness of my 2010 programming capabilities. If I'd have to re-do it, some design decisions would be different.
To recap: I cherish everyone who wants to help improve the pdftool by submitting me patches or the like and I will more than likly apply them and attribute the contributor adequtely. But you will not make me re-write stuff just because you consider it poorly coded, period.
1 Needs another account with another password with another set of rules for secure passwords, needs attention, is another place where messages can pop up, needs essentially that one thing that's the most precious thing I have -- my time.