LF tip: Using Acrobat 7 with kde and kprinter

ArticleCategory: [Choose a category, translators: do not translate this, see list below for available categories]

SystemAdministration

AuthorImage:[Here we need a little image from you]

Gerrit photo

TranslationInfo:[Author + translation history. mailto: or http://homepage]

original in en Gerrit Renker

AboutTheAuthor:[A small biography about the author]

Gerrit didn't like any computers at all until he tried C and Linux.

Abstract:[Here you write a little summary]

This is a small tip. From now on LinuxFocus will have at least one new tip every month. If you have some ideas for a new tip then send them to guido("at"sign)linuxfocus.org

ArticleIllustration:[One image that will end up at the top of the article]

[Illustration]

ArticleBody:[The main part of the article]

Problem

Acrobat 7 is available and is a nice PDF viewer. Unfortunately, when printing it removes the output file before the KDE system (kprinter) has completed the print job.

Solution

Put a script in between which creates a temporary file for the postscript output and removes it afterwards.
#!/bin/sh
# save this as /usr/local/bin/printerScript
# and make it executable with: chmod 755 /usr/local/bin/printerScript
## create temporary file
tmp="/tmp/postscript-print-$$.ps"
[ -f "$tmp" ] && exit 1
## save the file to a new name which will not be deleted by acroread.
## the first argument is the file name of the postscript file
cp  "$1"  $tmp
## start the KDE printer frontend on this file
kprinter  $tmp
## clean up afterwards
rm -f     $tmp
##
Here is a screenshot of the printer config panel in acroread:
[acroread printer config panel]

mirror server hosted at Truenetwork, Russian Federation.