Bug 228855 - dcop konqueror print true does not work
Summary: dcop konqueror print true does not work
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: general (other bugs)
Version First Reported In: 4.4.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-28 07:59 UTC by gilado
Modified: 2023-01-11 05:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gilado 2010-02-28 07:59:42 UTC
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}
Comment 1 Tommi Tervo 2010-02-28 11:08:26 UTC
KDE4 doesn't have dcop anymore, it uses dbus.

I managed to find command which gives printing dialog:

dbus-send --type=method_call --dest=org.kde.konqueror-`pidof konqueror`  /konqueror/MainWindow_1/actions/print com.trolltech.Qt.QAction.trigger

but I couldn't figure out how to print directly without that printing dialog.
Comment 2 Andrew Crouthamel 2018-11-02 23:06:44 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Andrew Crouthamel 2018-11-16 05:33:48 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version?

Thank you for helping us make KDE software even better for everyone!
Comment 4 Justin Zobel 2022-12-12 01:56:07 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 5 Bug Janitor Service 2022-12-27 05:21:20 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2023-01-11 05:19:16 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!