[prev in list] [next in list] [prev in thread] [next in thread]
List: konq-bugs
Subject: [Bug 228855] New: dcop konqueror print true does not work
From: gilado <bugkde () odinak ! com>
Date: 2010-02-28 6:59:44
Message-ID: bug-228855-5021 () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=228855
Summary: dcop konqueror print true does not work
Product: konqueror
Version: 4.4.0
Platform: unspecified
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: konq-bugs@kde.org
ReportedBy: bugkde@odinak.com
Version: (using KDE 4.4.0)
OS: Linux
Installed from: Unlisted Binary Package
I am using konq in a script to faithfully convert html to pdf. I can almost
automate the entire process except that I have to let it bring the print dialog
and click the print button. If send the dcop command to automatically print,
it does not work.
The broken dcop command is:
dcop konqueror-${KONQPID} html-widget1 print true
Here's the complete script:
#!/bin/bash
#
# syntax: khtml2pdf <htmlfile> <pdffile>
HTMLFILE="$1"
PDFFILE="$2"
TMPDIR="${TMP}/khtml2pdf.$$"
KONQRC="${HOME}/.kde/share/config/konquerorrc"
rm -rf ${TMPDIR}
mkdir -p ${TMPDIR}
mv -f ${KONQRC} ${KONQRC}.sav
cat > ${KONQRC} <<EOD
[KPrinter Settings]
ApplicationOptions=app-khtml-printfriendly,false,app-khtml-printheader,true,app-khtml-printimages,true
DialogReduced=false
DocDirectory[\$e]=${TMPDIR}
PrintCommand[\$e]=
Printer=Print to File (PDF)
EOD
konqueror --sync ${HTMLFILE} >/dev/null 2>&1 &
KONQPID=$!
sleep 2
# to completely automate this one should pass true as the last argument
# to the line below. however, there seems to be a bug in kde where if
# you pass true it forgets to pass the value of the Printer= setting to
# cpusdoprint. this bug seems to have been there for a few years!?
dcop konqueror-${KONQPID} html-widget1 print false
sleep 2
dcop konqueror-${KONQPID} konqueror-mainwindow#1 close
mv -f ${TMPDIR}/print.pdf ${PDFFILE}
mv -f ${KONQRC}.sav ${KONQRC}
rm -rf ${TMPDIR}
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Konq-bugs mailing list
Konq-bugs@mail.kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic