Accepting request 116655 from openSUSE:Tools

Improve pdf handling (forwarded request 116654 from a_jaeger)

OBS-URL: https://build.opensuse.org/request/show/116655
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/build-compare?expand=0&rev=70
This commit is contained in:
Stephan Kulow 2012-05-07 20:43:41 +00:00 committed by Git OBS Bridge
commit 3a600b4269
2 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon May 7 14:50:43 UTC 2012 - aj@suse.de
- Further handling of pdf files (bnc#760867).
-------------------------------------------------------------------
Mon May 7 11:30:28 UTC 2012 - aj@suse.de
- Handle /ID in pdf files (bnc#760867).
-------------------------------------------------------------------
Wed Apr 4 18:25:48 UTC 2012 - reddwarf@opensuse.org

View File

@ -1,6 +1,6 @@
#! /bin/bash
#
# Copyright (c) 2009, 2010, 2011 SUSE Linux Product GmbH, Germany.
# Copyright (c) 2009, 2010, 2011, 2012 SUSE Linux Product GmbH, Germany.
# Licensed under GPL v2, see COPYING file for details.
#
# Written by Michael Matz and Stephan Coolo
@ -402,6 +402,19 @@ check_single_file()
echo "Ignore $file"
return 0
;;
*pdf)
# PDF files contain a unique ID, remove it
# Format of the ID is:
# /ID [<9ACE247A70CF9BEAFEE15E116259BD6D> <9ACE247A70CF9BEAFEE15E116259BD6D>]
# pdftex creates also:
# /CreationDate (D:20120103083206Z)
# /ModDate (D:20120103083206Z)
for f in old/$file new/$file; do
sed -i -e 's%/ID \?\[ \?<[^>]\+> <[^>]\+> \?\]%/IDrandom%g' $f
sed -i -e 's%/CreationDate (D:.*)%/CreationDate (D: XXX)%g' $f
sed -i -e 's%/ModDate (D:.*)%/ModDate (D: XXX)%g' $f
done
;;
esac
ftype=`/usr/bin/file old/$file | cut -d: -f2-`