Your message dated Sun, 29 Jan 2012 16:11:50 -0600
with message-id <20120129221149.GB9419@burratino>
and subject line Re: ghostscript: Provide ps2pdfa
has caused the Debian Bug report #657817,
regarding ghostscript: Provide ps2pdfa
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
657817: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657817
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ghostscript
Version: 9.04~dfsg-3
Severity: wishlist
Tags: patch
Dear Maintainer,
Along with the other ps2pdf* scripts, it would be very helpful to have a
script to create PDF/A. Attached is an attempt at creating such a
script.
Attachments:
1. ps2pdfa script, modelled on the others.
2. A patch file that makes minor changes to ps2pdfwr to allow ps2pdfa to
provide an additional input file. It needs this in order to provide a
PDFA_def file.
3. Two PDFA_def files: one for each of DeviceGrey and DeviceCMYK, based
on /usr/share/ghostscript/9.04/lib/PDFA_def.ps. The only difference is
that the /ICCProfile is set to one of
/usr/share/ghostscript/9.04/iccprofiles/default_(grey|cmyk).icc
I have not done much sh programming, so there may be improvements that
can be made.
It works, except for an error message which seems to be related to file
permissions, but I can't figure out what is wrong. It works if I comment
out the line in the PDFA_def file:
[{icc_PDFA} ICCProfile (r) file /PUT pdfmark
But with that line gone, I don't think it creates a valid PDF/A
document.
Besides fixing this issue, there is one other todo. The title is
supposed to be set in the PDFA_def file. I think doing this is beyond
what I am comfortable doing in sh. Should I generate a tmpfile
containing a customized PDFA_def with the title?
I would appreciate your assistance with this or your referral to a
better forum to present this feature request.
Thank you,
Liam Morland
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 3.1.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_CA.UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ghostscript depends on:
ii debconf [debconf-2.0] 1.5.41
ii debianutils 4.1
ii gsfonts 1:8.11+urwcyr1.0.7~pre44-4.2
ii libc6 2.13-24
ii libgs9 9.04~dfsg-3
ghostscript recommends no packages.
Versions of packages ghostscript suggests:
pn ghostscript-cups 9.04~dfsg-3
pn ghostscript-x 9.04~dfsg-3
pn hpijs <none>
-- no debconf information
#!/bin/sh
# $Id$
# Convert PostScript to PDF/A.
ps2pdfwr="`dirname \"$0\"`/ps2pdfwr"
if test ! -x "$ps2pdfwr"; then
ps2pdfwr="ps2pdfwr"
fi
# Command line switch to select grey output
if [ $# -gt 0 ] && [ `expr $1 : -grey` -eq 5 ]; then
color="Grey"
shift
else
color="CMYK"
fi
exec "$ps2pdfwr" -dPDFA -dNOOUTERSAVE -sProcessColorModel=Device$color -in=PDFA_def-$color.ps "$@"
# @todo: Title should be set in the PDFA_def file.
diff -u a/ps2pdfwr b/ps2pdfwr
--- a/ps2pdfwr 2012-01-28 22:43:23.000000000 -0500
+++ b/ps2pdfwr 2012-01-28 22:46:54.000000000 -0500
@@ -12,9 +12,11 @@
GS_EXECUTABLE="$gs"
OPTIONS="-P- -dSAFER"
+pre_infile=""
while true
do
case "$1" in
+ -in=*) pre_infile="$pre_infile `expr substr "$1" 5 9999`";;
-?*) OPTIONS="$OPTIONS $1" ;;
*) break ;;
esac
@@ -42,4 +44,4 @@
# We have to include the options twice because -I only takes effect if it
# appears before other options.
-exec "$GS_EXECUTABLE" $OPTIONS -q -P- -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr "-sOutputFile=$outfile" $OPTIONS -c .setpdfwrite -f "$infile"
+exec "$GS_EXECUTABLE" $OPTIONS -q -P- -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr "-sOutputFile=$outfile" $OPTIONS -c .setpdfwrite -f "$pre_infile" "$infile"
PDFA_def-CMYK.ps
Description: PostScript document
PDFA_def-Grey.ps
Description: PostScript document
--- End Message ---
--- Begin Message ---
forwarded 657817 http://bugs.ghostscript.com/show_bug.cgi?id=692822
quit
Liam Morland wrote:
> http://bugs.ghostscript.com/show_bug.cgi?id=692822
Thanks! Upstream response:
| I think that the required input for PDF/A output is really too complex t make
| into a script that we will support.
|
| The scripts are intended to allow *simple* tasks to be performed without
| recourse to the Ghostscript command line, this is not a simple task as
| evidenced by the fact that your modified shell script requires an additional
| input file.
For the time being I don't think it's worth carrying this as a
Debian-specific patch, so closing.
Please do keep us posted, though, and e.g. if several packages end up
needing this then we'll probably be happy to reconsider. Or maybe
it's worth rearranging into an example for documentation.
--- End Message ---