You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, November 29th 2007, 8:03pm

Using DCOP to print a web page to a PDF

I need to convert web pages to PDF and have stumbled across DCOP. Pretty nice! and thanks. I use the following to do this:

Find the PID:

dcop 'konq*'

Load the URL

dcop konqueror-3060 konqueror-mainwindow#1openURL slashdot.org

Find the html-widget number

dcop konqueror-3060 | grep html-widget

Print the page. I have previously set up the basic print options.

dcop konqueror-3060 html-widget3 print false

There are two problems. The worst is waiting for the web page to fully load before printing. I have background loading disabled and can't think of anything else which might affect this.

A second, minor, problem is a popup about no printer configured, use -all to get a list. This is no big deal except that sooner or later I will have to quit the konqueror session to clear the mesages.

Is there either a better (ie, command line) way of doing this, or some way of waiting for the web page to fully load before printing? Even polling for load status would be better than sleep for some arbitrary time and hope for the best?

2

Tuesday, January 13th 2009, 3:52am

Pls kindly advise how could you get rid of the popup?