mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2026-01-04 03:01:52 +00:00
OCRmyPDF.sh: page number now with leading zeros
This commit is contained in:
parent
2c23bca913
commit
7c3abea232
@ -24,6 +24,9 @@ echo "PDF file has $numpages pages"
|
||||
page="1"
|
||||
cat "$FILE_SIZEPAGES" | while read pageSize ; do
|
||||
|
||||
# add leading zeros to the page number
|
||||
page=`printf "%04d" $page`
|
||||
|
||||
echo "Page $page: Computing embedded image resolution"
|
||||
# get width / height of PDF page
|
||||
heightPDF=`echo $pageSize | cut -f1 -d" "`
|
||||
@ -84,7 +87,6 @@ done
|
||||
|
||||
|
||||
# concatenate all pages
|
||||
# TODO pages are currently not concatenated in the right order due to their naming (e.g. 2.pdf after 10.pdf)
|
||||
pdftk ${tmp}/*-ocred.pdf cat output "${tmp}/ocred.pdf"
|
||||
|
||||
# insert metadata
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user