Skip to main content

Concatenation / joining of multiple PDF files in linux

Concatenation / joining of multiple PDF files in linux

Multiple files are easy to concatenate / join in linux terminal.
=====================================
Easy command to join pdf files:
pdfjam file1.pdf file2.pdf file3.pdf --outfile combinedfile.pdf
=====================================
pdfjam is a shell-script front end to the LaTeX 'pdfpages' package (for
which, see http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages).

Usage: pdfjam [OPTIONS] [--] [FILE1 [SEL1]] [FILE2 [SEL2]]...
where
* 'FILE1' etc. are PDF files (JPG and PNG files are also allowed).  For
   input from /dev/stdin, use the special name '/dev/stdin' in place of any
   of FILE1, FILE2, etc: this can be mixed with 'real' files as needed, to
   allow input through a pipe (note that if /dev/stdin is connected to tty,
   an error results).  If 'FILE1' is absent, pdfjam will use '/dev/stdin'
   (and will use '-' for the page selection -- see next item).
* 'SEL1' is a page selection for FILE1, etc.
   To select all pages (the default) use '-'.  See the pdfpages manual for
   more details.  An example:
          ... file1 '{},2,4-5,9-' ...
   makes an empty page, followed by pages 2,4,5,6 of file1, followed by pages
   9 onwards (up to the end of file1).
   A page selection can be applied to more than one file, e.g.,
          ... file1 file2 file3 1-7 ...
   applies page selection '1-7' to all three files; but for example
          ... file1 file2 2- file3 1-7 ...
   would apply the page selection '2-' to file1 and file2, and '1-7'
   to file3.  A page selection applies to all the files *immediately*
   preceding it in the argument list.  A missing page selection defaults to
   '-'; this includes the case where 'FILE1' is absent and so /dev/stdin gets
   used by default.
* 'options' are pdfpages specifications in the form '--KEY VALUE' (see
   below), or
     --help  (or -h, or -u)
                  Output this text only; no processing of PDF files.
     --configpath
                  Output the 'configpath' variable and exit immediately; no
                  processing of PDF files.
     --version (or -V)
                  Output the version number of pdfjam and exit immediately; no
                  processing of PDF files.
     --quiet  (or -q)
                  Suppress verbose commentary on progress.
     --batch
                  Run pdfjam sequentially on each input file in turn, and
                  produce a separate output file for each input, rather
                  than the default behaviour (which is a single run of
                  pdfjam on all of the input files, producing a single
                  output document).  For the location of output
                  files, see '--outfile'.  The --batch option cannot be
                  used in the case of input fron stdin.
     --outfile PATH  (or -o PATH)
                  Specifies where the output file(s) will go.  If PATH is an
                  existing directory, pdfjam will attempt to write its
                  output PDF file(s) there, with name(s) derived from the
                  input file name(s) and the --suffix option (see below).
                  Otherwise the output file will be PATH.  If '/dev/stdin'
                  is the only or last input file, PATH cannot be a directory.
                  Your current default PATH for output is:
                  /home/mangesh/Documents/16NOVEMBER/Cert/Resume
     --suffix STRING
                  Specifies a suffix for output file names, to be used when
                  --outfile is either (a) a directory, or
                                      (b) not specified in a --batch call.
                  A good STRING should be descriptive: for example,
                           --suffix 'rotated'
                  would append the text '-rotated' to the name of the input
                  file in order to make the output file name, as in
                  'myfile-rotated.pdf'.  The STRING must not have zero
                  length.
                  [Default for you at this site: suffix=pdfjam]
     --checkfiles
     --no-checkfiles
                  If the Unix 'file' utility is available, with options
                  -L and -b, the output of 'file -Lb FILE1' should be
                  'PDF document...' where '...' gives version information.
                  If this is the case on your system you should use
                  '--checkfiles'; otherwise use '--no-checkfiles',
                  in which case all input PDF files must have .pdf or .PDF
                  as their name extension.
                  [Default for you at this site: checkfiles=false]
     --preamble STRING
                  Append the supplied STRING to the preamble of the LaTeX
                  source file(s), immediately before the '\begin{document}'
                  line.  An example:
                      pdfjam --nup 2x2 myfile.pdf -o myfile-4up.pdf \
                          --preamble '\usepackage{fancyhdr} \pagestyle{fancy}'
                  The '--preamble' option can be used, for example, to load
                  LaTeX packages and/or to set global options.  If '--preamble'
                  is used more than once in the call, the supplied preamble
                  strings are simply concatenated.
     --keepinfo
     --no-keepinfo
                  Preserve (or not) Title, Author, Subject and Keywords
                  (from the last input PDF file, if more than one) in the
                  output PDF file.  This requires the pdfinfo utility, from
                  the xpdf package, and the LaTeX 'hyperref' package; if
                  either of those is not available, '--keepinfo' is ignored.
                  [Default for you at this site: keepinfo=false]
     --pdftitle STRING
     --pdfauthor STRING
     --pdfsubject STRING
     --pdfkeywords STRING
                  Provide text for the  Title, Author, Subject and Keywords
                  in the output PDF file.  Requires the  LaTeX 'hyperref'
                  package.  These options, individually, over-ride --keepinfo.
     --landscape
     --no-landscape
                  Specify landscape page orientation (or not) in the
                  output PDF file.
                  [Default for you at this site: landscape=]
     --twoside
     --no-twoside
                  Specify (or not) the 'twoside' document class option.
                  [Default for you at this site: twoside=]
     --paper PAPERSPEC  (or simply --PAPERSPEC)
                  Specify a LaTeX paper size, for example
                  '--paper a4paper' or simply '--a4paper' for ISO A4 paper.
                  If the LaTeX 'geometry' package is installed, a wider range
                  of paper sizes is available.  For details see documentation
                  for LaTeX and/or the 'geometry' package.
                  [Default for you at this site: paper=a4paper]
     --papersize '{WIDTH,HEIGHT}'
                  Specify a custom paper size, e.g.,
                      --papersize '{10in,18cm}'
                  (Note the braces, and the comma!)
                  If the 'geometry' package is not found, this has no effect.
     --pagecolor RGBSPEC
                  Specify a background colour for the output pages.  The
                  RGBSPEC must be a comma-separated trio of integers
                  between 0 and 255.  An example:
                         --pagecolor 150,200,150
                  [Default is no background colour]
     --tidy
     --no-tidy
                  Specify whether the temporary directory created by
                  pdfjam should be deleted.  Use '--no-tidy' to help debug
                  most errors.
                  [Default for you at this site: tidy=true]
     --vanilla
                  Suppress the reading of any site-wide or user-specific
                  configuration files.
     --KEY VALUE
                  Specify options to '\includepdfmerge', in the LaTeX
                  'pdfpages' package.  Here KEY is the name of any of the
                  many options for '\includepdfmerge', and VALUE is a
                  corresponding value.  Examples are
                      --nup 2x1     (for 2-up side-by-side imposition)
                      --scale 0.7   (to scale all input pages to 70% size)
                      --offset '1cm 0.5cm'
                                    (to offset all pages -- note the quotes!)
                      --frame true  (to put a frame round each input page)
                      --trim '1cm 2cm 1cm 2cm' --clip true
                                    (to trim those amounts from left, bottom,
                                     right and top, respectively, of input
                                     pages)
                  etc., etc.  For more information see the manual for
                  the 'pdfpages' package, at
                  http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages
* '--' can be used to signal that there are no more options to come.

Defaults for the options '--suffix', '--keepinfo', '--paper', '--outfile',
'--landscape', '--twoside', '--tidy', '--checkfiles' and '--preamble' can be
set in site-wide or user-specific configuration files.  The path that is
searched for site-wide configuration files (named pdfjam.conf) at this
installation is
    /etc:/usr/share/etc:/usr/local/share:/usr/local/etc
This configuration path can be changed by editing the pdfjam script if
necessary.  Any user-specific configuration should be put in a file named
.pdfjam.conf in your home directory.  (All of these files are ignored
if the '--vanilla' argument is used.)

For more information, including an example configuration file, see
http://go.warwick.ac.uk/pdfjam.

Comments

Most Viewed Post

How to keep chain ID / IDs in GROMACS?

In GROMACS , while converting pdb file (monomer or multimer) into .gro file, it do not preserve the chain ID information. Due to the lack of chain ID information, pdb file retrieved from .gro file at any stage of the simulation has missing chain IDs and pdb file can not be visualized properly in PYMOL / RASMOL . There are two ways to convert .gro file into .pdb Lets say your protein name is xyz.pdb 1] gmx editconf -f xyz.gro -o xyz.pdb 2] gmx trjconv -f  xyz.gro -o xyz.pdb -s xyz.tpr Only ' trjconv ' will retrieve the chain ID information for all the chains. and not ' editconf '. If you have monomer protein and wish to assign any chain ID then following command will be of your interest: gmx editconf -f xyz.gro -o xyz.pdb -label [ chain-ID ]

Python : Turtle tree

Turtle module can be used to draw some very nice patterns in Python. Following are some examples with code. ==================== import turtle import random t = turtle.Turtle( shape = "circle" ) t.lt( 90 ) lv = 14 l = 120 s = 30 t.color( 'indigo' ) t.width(lv) t.penup() t.bk(l) t.pendown() t.fd(l) def draw_tree ( l , level ): width = t.width() # save the current pen width t.width(width * 3.0 / 4.0 ) # narrow the pen width l = 3.0 / 4.0 * l #t.color(R,G,B) #provide the RGB numbers t.color(random.random(), random.random(), random.random()) t.lt(s) t.fd(l) if level < lv: draw_tree(l, level + 1 ) t.color(random.random(), random.random(), random.random()) t.bk(l) t.rt( 2 * s) t.fd(l) if level < lv: draw_tree(l, level + 1 ) t.color(random.random(), random.random(), random.random()) t.bk(l) t.lt(s) t.width(width) # restore the previous pen width t.speed( "fastest" ) draw_tree(l, 5 ) turtle.done() ===========...

How to use MODELLER to build DIMER homology model with ligand?

How to use MODELLER to build DIMER homology model with ligand? Procedure:     Get Fasta sequence from UNIPROT database.     Predict sequence alignment from HHPRED     Prepare INPUT files for MODELLER     model-dimer.py (Click to download) ############### from modeller import * from modeller.automodel import * #from modeller import soap_protein_od env = environ() env.io.hetatm = True a = automodel(env, alnfile='TvLDH-1bdm.ali',               knowns='1bdm',               sequence='TvLDH',               assess_methods=(assess.DOPE,                            ...

GNUPLOT: How to draw trend line?

How to draw trend line in the GNUPLOT? If you like to plot graphs in gnuplot and dont know how to plot trendline then here you are. Follow the steps mentioned below... 1. You should have a files with X and Y values 2. Open GNUPLOT (Operating system dosen't change anything here. It works on all systems) 3. Type the command in the gnuplot terminal Lets say I have a file for eg. '1.txt' p '1.txt' u 1:2 w d title '', '1.txt' u 1:2 smooth acsplines title '1.txt' OR p '1.txt' u 1:2 w d title '', '1.txt' u 1:2 smooth bezier title '1.txt' It will plot as below...

Plagarism Checker

Plagiarism is a serious academic misconduct. Whether you are a student writing a college essay, a teacher reviewing a student’s submission, or just someone who works extensively with content, it is important to ensure that the content is not plagiarized. Following are some resources to check Plagiarism. http://www.plagscan.com https://www.plagramme.com/   http://www.plagiarisma.net/fr/# http://www.scanmyessay.com http://www.plagtracker.com http://www.duplichecker.com http://www.smallseotools.com/plagiarism-checker http://www.plagium.com/fr/detecteurdeplagiat http://www.paperrater.com/plagiarism_checker http://www.copyleaks.com http://www.plagiarismchecker.com http://www.quetext.com http://plagiarismdetector.net http://www.solidseotools.com/plagiarism-checker http://www.dustball.com/cs/plagiarism.checker http://www.articlechecker.com http://www.plagiarismcheck.org

Science News

Enter your email address:

PhD Vacancy Bioinformatics

PhD Vacancy Chemoinformatics