diff --git a/OCRmyPDF.sh b/OCRmyPDF.sh index 09408ed4..31fc51bd 100644 --- a/OCRmyPDF.sh +++ b/OCRmyPDF.sh @@ -227,7 +227,7 @@ numpages=`tail -n 1 "$FILE_PAGES_INFO" | cut -f1 -d" "` # concatenate all pages [ $VERBOSITY -ge $LOG_DEBUG ] && echo "Output file: Concatenating all pages" -! pdftk "${TMP_FLD}/"*-ocred.pdf cat output "$FILE_OUTPUT_PDF_CAT" \ +! pdftk "${TMP_FLD}/"*ocred*.pdf cat output "$FILE_OUTPUT_PDF_CAT" \ && echo "Could not concatenate individual PDF pages (\"${TMP_FLD}/*-ocred.pdf\") to one file. Exiting..." && exit $EXIT_OTHER_ERROR # convert the pdf file to match PDF/A format diff --git a/src/ocrPage.sh b/src/ocrPage.sh index 7ef9c34f..35aeecab 100644 --- a/src/ocrPage.sh +++ b/src/ocrPage.sh @@ -126,12 +126,12 @@ widthPDF=`echo $PAGE_INFO | cut -f2 -d" "` heightPDF=`echo $PAGE_INFO | cut -f3 -d" "` # create the name of the required temporary files -curOrigImg="$TMP_FLD/${page}_Image" # original image available in the current PDF page +curOrigImg="$TMP_FLD/${page}.orig-img" # original image available in the current PDF page # (the image file may have a different orientation than in the pdf file) -curHocr="$TMP_FLD/$page.hocr" # hocr file to be generated by the OCR SW for the current page -curOCRedPDF="$TMP_FLD/${page}-ocred.pdf" # PDF file containing the image + the OCRed text for the current page -curOCRedPDFDebug="$TMP_FLD/${page}-debug-ocred.pdf" # PDF file containing data required to find out if OCR worked correctly -curImgCharacteristics="$TMP_FLD/${page}-img-characteristics.txt" # Detected characteristics of the embedded image +curHocr="$TMP_FLD/${page}.hocr" # hocr file to be generated by the OCR SW for the current page +curOCRedPDF="$TMP_FLD/${page}.ocred.pdf" # PDF file containing the image + the OCRed text for the current page +curOCRedPDFDebug="$TMP_FLD/${page}.ocred-debug.pdf" # PDF file containing data required to find out if OCR worked correctly +curImgCharacteristics="$TMP_FLD/${page}.orig-img-info.txt" # Detected characteristics of the embedded image # auto-detect the characteristics of the embedded image