Topic: Can uploaded files be exported from ConfTool with consecutive page numbers?  (Read 2388 times)

We want to export the final versions of all accepted submission from our ConfTool installation to create our proceedings. Is there any option to merge these files and to insert page numbers automatically?

No, sorry, there isn't.

For various reasons we believe that in most cases it won’t make too much sense for organizers to merge files and insert page numbers automatically during the export process:
  • The organizers often decide to arrange the submissions in a certain order.
  • They have to consider additional pages like table of contents, foreword, preface or introduction, finally glossary, bibliography and index.
  • Often the publishers also want to add running titles to the pages or use other formatting options.

Therefore we recommend exporting the files first, then merging them and inserting page headers and numbers by using your text-processing software. We also always recommend asking authors to upload their submissions as PDF and as DOC/DOCX file, so you have contributions in a source (Word) format that can easily be edited (see: Uploading 2 (or more) files for the final version of submissions).

Word has an option to merge several documents easily. Maybe also have a look at these instructions on how to add page numbers in Word or how to control the start page numbering in your document.

If you prefer to work with PDF files (or you have only PDF files available), there are various options to merge the files and to add pages numbers. Probably most popular tools are Adobe Acrobat Standard, Professional or Pro that allow merging and editing PDF files. However, these versions are not free of charge. You can use open source products like PDFsam (PDF Split and Merge) instead. If you want to add page numbers to a PDF file, please have a look at PDFill PDF Editor.

General instructions on the creation of the conference proceedings are available in the main ConfTool documentation: How to Export Data for the Conference Proceedings.


If you have some Linux/Unix background, you can also use a bash script to add headers/footers and page numbers to your PDF files. You can find an example script below.
The script uses pdflatex, PDFtk and grep for these operations, and creates new PDF files using LaTeX.

We thank Michael Wetter for making this script available.

Code: [Select]
#!/bin/bash
set -e

# Define paths
CURDIR=`pwd`
SRC=$CURDIR/allPapers-preHeader
DES=$CURDIR/proceedings-withHeader
TEM=`mktemp -d -t conference-XXXXXX`
TEM2=$CURDIR/headerFooterGeneration


# Delete and recreate destination directory
rm -rf $DES
mkdir $DES

# Get list of all papers
papLis=`cd $SRC && find . -name '*.pdf' -print`

# Variables for page counter.
nPageSta=0
nPageEnd=0
nAdd=0

for pa in $papLis; do
    echo "**************************************"
    echo "*** Converting $pa"
    echo "**************************************"
    rm -rf $TEM
    mkdir -p $TEM

    cp $SRC/$pa $TEM/$pa

    #############################
    # Get page numbers using PDFTK
    #############################
    let nPageSta=nPageEnd+1
    cd $TEM
    echo "--- Dumping data"
    pdftk $pa dump_data output data.txt
    grep "NumberOfPages:" data.txt > data2.txt
    sed -e 's/NumberOfPages://g' data2.txt > data3.txt
    iPag=`cat data3.txt`
    # iPag is the number of pages of the current PDF document
    nPageEnd=$((nPageSta + iPag -1))
    echo "    Page numbers: $nPageSta - $nPageEnd  ($iPag pages)"
    cd $CURDIR

    #############################
    # Make latex document
    #############################
    mkdir -p $TEM2
    cd $TEM2
    nAdd=$((nPageSta - 1))
    # Add your LaTeX code here...
    echo "\documentclass[10pt, a4paper]{article}" > pageHeaderFooter.tex
    echo "\begin{document}" >> pageHeaderFooter.tex
    # Tell  LaTeX to create page numbers
    echo "\addtocounter{page}{${nAdd}}" >> pageHeaderFooter.tex

    COUNTER=0
    while [  $COUNTER -lt $iPag ]; do
echo "~ \clearpage" >> pageHeaderFooter.tex
let COUNTER=COUNTER+1
    done
    echo "\end{document}" >> pageHeaderFooter.tex

    echo "    Starting pdfLaTeX to generate PDF file with page numbers. In case of errors, enter x RETURN to quit."
    # Start pdflatex and write output to file out.txt instead of console...
    pdflatex pageHeaderFooter.tex > out.txt
    rm out.txt
    # Use the line below for debugging instead...
    #pdflatex pageHeaderFooter.tex

    #############################
    # Merge documents
    #############################
    cd $TEM
    cp $TEM2/pageHeaderFooter.pdf .
    echo "--- Bursting paper"
    pdftk $pa burst output paper_%03d.pdf
    echo "--- Bursting header"
    pdftk pageHeaderFooter.pdf burst output header_%03d.pdf

    # Assemble pdf
    COUNTER=1
    echo "--- Adding background"
    while [  $COUNTER -le $iPag ]; do
printf -v COUNTER_PADDED "%03d" $COUNTER
pdftk paper_${COUNTER_PADDED}.pdf background header_${COUNTER_PADDED}.pdf output out_${COUNTER_PADDED}.pdf
let COUNTER=COUNTER+1
    done
    cp out_001.pdf $pa
    COUNTER=2
    echo "--- Merging paper"
    while [  $COUNTER -le $iPag ]; do
printf -v COUNTER_PADDED "%03d" $COUNTER
pdftk $pa out_${COUNTER_PADDED}.pdf cat output temp.pdf
mv temp.pdf $pa
let COUNTER=COUNTER+1
    done
    cp $pa $DES
    cd $CURDIR
done

rm -f $DES/data.txt $DES/data2.txt $DES/data3.txt
rm -fr $TEM2

#############################
# Merge all papers
#############################
cd $DES
pdftk $papLis cat output proceedings.pdf

To install pdfTeX on Ubuntu, you can use:
# sudo apt-get install texlive-latex-base
To Install pdftk on Ubunti, you can use:
# sudo apt-get install pdftk