From 7e8481186abf9f3c339602cbf37a23bfe30ce40a Mon Sep 17 00:00:00 2001 From: fritz-hh Date: Mon, 6 May 2013 21:26:33 +0200 Subject: [PATCH 1/2] OCRmyPDF.sh: metadata not added anymore Removed feature to add metadata in final pdf file (because it lead to to final PDF file that does not comply to the PDF/A-1 format) --- OCRmyPDF.sh | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/OCRmyPDF.sh b/OCRmyPDF.sh index 0d0248e0..e341371d 100644 --- a/OCRmyPDF.sh +++ b/OCRmyPDF.sh @@ -4,7 +4,7 @@ ############################################################################## TOOLNAME="OCRmyPDF" -VERSION="v1.0-rc2" +VERSION="v1.0-stable" START=`date +%s` @@ -309,28 +309,28 @@ done < "$FILE_SIZE_PAGES" [ $VERBOSITY -ge $LOG_DEBUG ] && echo "Output file: Converting to PDF/A" ! gs -dQUIET -dPDFA -dBATCH -dNOPAUSE -dUseCIEColor \ -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=2 \ - -sOutputFile="$FILE_OUTPUT_PDFA_WO_META" "$FILE_OUTPUT_PDF_CAT" 1> /dev/null 2> /dev/null \ + -sOutputFile="$FILE_OUTPUT_PDFA" "$FILE_OUTPUT_PDF_CAT" 1> /dev/null 2> /dev/null \ && echo "Could not convert PDF file \"$FILE_OUTPUT_PDF_CAT\" to PDF/A. Exiting..." >&2 && exit $EXIT_OTHER_ERROR -# Write metadata -# Needs to be done after converting to PDF/A, as gs does not preserve metadata -[ $VERBOSITY -ge $LOG_DEBUG ] && echo "Output file: Update metadata (creator, producer, and title)" -title=`basename "$FILE_INPUT_PDF" | sed 's/[.][^.]*//' | \ - sed 's/_/ /g' | sed 's/-/ /g' | \ - sed 's/\([[:lower:]]\)\([[:upper:]]\)/\1 \2/g' | \ - sed 's/\([[:alpha:]]\)\([[:digit:]]\)/\1 \2/g' | \ - sed 's/\([[:digit:]]\)\([[:alpha:]]\)/\1 \2/g'` # transform the file name (with extension) into distinct words -pdftk "$FILE_OUTPUT_PDFA_WO_META" update_info_utf8 - output "$FILE_OUTPUT_PDFA" << EOF -InfoBegin -InfoKey: Title -InfoValue: $title -InfoBegin -InfoKey: Creator -InfoValue: $TOOLNAME $VERSION -InfoBegin -InfoKey: Producer -InfoValue: ghostcript `gs --version`, pdftk -EOF +# # Write metadata +# # Needs to be done after converting to PDF/A, as gs does not preserve metadata +# [ $VERBOSITY -ge $LOG_DEBUG ] && echo "Output file: Update metadata (creator, producer, and title)" +# title=`basename "$FILE_INPUT_PDF" | sed 's/[.][^.]*//' | \ + # sed 's/_/ /g' | sed 's/-/ /g' | \ + # sed 's/\([[:lower:]]\)\([[:upper:]]\)/\1 \2/g' | \ + # sed 's/\([[:alpha:]]\)\([[:digit:]]\)/\1 \2/g' | \ + # sed 's/\([[:digit:]]\)\([[:alpha:]]\)/\1 \2/g'` # transform the file name (with extension) into distinct words +# pdftk "$FILE_OUTPUT_PDFA_WO_META" update_info_utf8 - output "$FILE_OUTPUT_PDFA" << EOF +# InfoBegin +# InfoKey: Title +# InfoValue: $title +# InfoBegin +# InfoKey: Creator +# InfoValue: $TOOLNAME $VERSION +# InfoBegin +# InfoKey: Producer +# InfoValue: ghostcript `gs --version`, pdftk +# EOF # validate generated pdf file (compliance to PDF/A) [ $VERBOSITY -ge $LOG_DEBUG ] && echo "Output file: Checking compliance to PDF/A standard" From 87e01aff607c56ad7e315669a22af9b745708d83 Mon Sep 17 00:00:00 2001 From: fritz-hh Date: Mon, 6 May 2013 21:29:15 +0200 Subject: [PATCH 2/2] readme updated for v1.0-stable --- RELEASE_NOTES.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 6705716c..bfb6214c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -5,6 +5,43 @@ Please always read this file before installing the package Download software here: https://github.com/fritz-hh/OCRmyPDF/tags +v1.0-stable (2013-05-06): +==== + +New features +------------ + +- In debug mode: compute and echo time required for processing (fixes #26) + +Changes +------- + +- Removed feature to add metadata in final pdf file (because it lead to to final PDF file that does not comply to the PDF/A-1 format) +- Removed feature to set same owner & permissions in final PDF file than in input file +- Removed many unused jhove files (e.g. documentation, *.java and *.class files) + +Fixes +----- + +- Correction to handle correctly path and input PDF files having spaces (fixes #31) +- Resolutions (x/y) that are nearly equal are now supported (fixes #25) +- Fix compatibility issue with Ubuntu server 12.04 / Ubuntu server 10.04 / Linux Mint 13 Maya and probably other Linux distributions (fixes #27) +- Commit missing jhove files (*.jar mainly) due to wrong .gitignore + +Tested with +----------- + +- Operating system: FreeBSD 9.1 +- Dependencies: + - poppler-utils 0.22.2 + - ImageMagick 6.8.0-7 2013-03-30 + - Unpaper 0.3 + - tesseract 3.02.02 + - Python 2.7.3 + - pdftk 1.45 + - ghoscript (gs): 9.06 + - java: openjdk version "1.7.0_17" + v1.0-rc2 (2013-04-29): ==== @@ -12,7 +49,7 @@ New features ------------ - Keep temporary files if debug mode is set (fixes #22) -- Set same owner & permissions if final PDF file than in input file (fixes #9) +- Set same owner & permissions in final PDF file than in input file (fixes #9) - Added metadata in final pdf file (fixes #4) Changes