FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 11-28-2007, 03:37 PM
 
Default Converting HTML to PDF or PS -- DCOP Q now

On Tue, Nov 27, 2007 at 10:07:10PM +0000, Neil Bothwick wrote:
> On Tue, 27 Nov 2007 13:53:10 -0800, felix@crowfix.com wrote:
>
> > These web pages use Javascript; some render so-so without javascript,
> > some don't render at all well. What I would like is some firefox (or
> > Konqueror or ...) command line option to render the page and save it
> > as any other format -- jpg, pdf, ps, doesn't matter.
>
> You could probably do this with a shell script that loads Konqueror with
> the given URL and send it DCOP command(s) to print.

I have been fooling around with this and following some of the google
treasure, and it is a decent substitute for the nice simple command
line options that I want. But it has a few problems:

1. The 'print' DCOP command pops up the print menu and requires at
least one click. I can set the print type (to PDF file) and the
default file name ahead of time, but I still have to click on
"Print".

2. When I pass it the URL to display, it returns immediately, and I
have to insert a sleep to wait before sending the print command.
Is there any way to find out when the page is complete?

3. If I put in a one minute pause to allow even the slowest web sites
to fully load, that limits how many of these URLs I can process.
Is there any way to run multiple konqueror sessions at once?

#1 is a real show stopper. The others are merely annoying.

--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o
--
gentoo-user@gentoo.org mailing list
 
Old 11-28-2007, 04:18 PM
Neil Bothwick
 
Default Converting HTML to PDF or PS -- DCOP Q now

On Wed, 28 Nov 2007 08:37:16 -0800, felix@crowfix.com wrote:

> 1. The 'print' DCOP command pops up the print menu and requires at
> least one click. I can set the print type (to PDF file) and the
> default file name ahead of time, but I still have to click on
> "Print".

Browsing kdcop, the print option accepts an option boolean argument,
quick. This skips the print requester. Try 'print 1' instead of 'print'.

> 2. When I pass it the URL to display, it returns immediately, and I
> have to insert a sleep to wait before sending the print command.
> Is there any way to find out when the page is complete?

ISTR there's a dcop comand to test whether a page has finished loading.


--
Neil Bothwick

Midget psychic escapes from prison, small medium at large!
 
Old 11-28-2007, 04:50 PM
 
Default Converting HTML to PDF or PS -- DCOP Q now

On Wed, Nov 28, 2007 at 05:18:03PM +0000, Neil Bothwick wrote:
> On Wed, 28 Nov 2007 08:37:16 -0800, felix@crowfix.com wrote:
>
> > 1. The 'print' DCOP command pops up the print menu and requires at
> > least one click. I can set the print type (to PDF file) and the
> > default file name ahead of time, but I still have to click on
> > "Print".
>
> Browsing kdcop, the print option accepts an option boolean argument,
> quick. This skips the print requester. Try 'print 1' instead of 'print'.

Unfortunately, it then ignores the default changes I've made and tries
to print straight to a non-existent printer.

I'm going to subscribe to the kde mailing list. I think this is
getting a bit away from gentoo-specific, but I will post any useful
answers here.

--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o
--
gentoo-user@gentoo.org mailing list
 
Old 11-28-2007, 09:06 PM
YoYo Siska
 
Default Converting HTML to PDF or PS -- DCOP Q now

felix@crowfix.com wrote:
> On Tue, Nov 27, 2007 at 10:07:10PM +0000, Neil Bothwick wrote:
>> On Tue, 27 Nov 2007 13:53:10 -0800, felix@crowfix.com wrote:
>>
>>> These web pages use Javascript; some render so-so without javascript,
>>> some don't render at all well. What I would like is some firefox (or
>>> Konqueror or ...) command line option to render the page and save it
>>> as any other format -- jpg, pdf, ps, doesn't matter.
>> You could probably do this with a shell script that loads Konqueror with
>> the given URL and send it DCOP command(s) to print.
>
> I have been fooling around with this and following some of the google
> treasure, and it is a decent substitute for the nice simple command
> line options that I want. But it has a few problems:
>
> 1. The 'print' DCOP command pops up the print menu and requires at
> least one click. I can set the print type (to PDF file) and the
> default file name ahead of time, but I still have to click on
> "Print".
>
> 2. When I pass it the URL to display, it returns immediately, and I
> have to insert a sleep to wait before sending the print command.
> Is there any way to find out when the page is complete?
>
> 3. If I put in a one minute pause to allow even the slowest web sites
> to fully load, that limits how many of these URLs I can process.
> Is there any way to run multiple konqueror sessions at once?
>
> #1 is a real show stopper. The others are merely annoying.

emerge -av x11-misc/xautomation
xte --help

it allows you to move mouse, click, send keypresses...
finding the right coordinates to click might not be easy (although the
package contains som programs that allow you to find specific pictures
on screen...) but sending the correct tab and enter sequence should be
enough (I expect just pressing enter in the dialog should be enough)

you should be able to use this also with firefox
send alt-f, p, few tabs to get to the "print to file", space, enter,
name of the file, enter....
)

yoyo
--
gentoo-user@gentoo.org mailing list
 
Old 11-28-2007, 09:47 PM
"Ricardo Saffi Marques"
 
Default Converting HTML to PDF or PS -- DCOP Q now

If you use KDE, you can right click the Title Bar and go to Application Specific Settings (or something like that. I'm on a Mac now :-) ) and configure the windows to always open at the center, for instance. That helps on the "finding the right coordinates to click might not be easy" issue. =)


On 11/28/07, YoYo Siska <yoyo@gl.ksp.sk> wrote:
felix@crowfix.com wrote:
> On Tue, Nov 27, 2007 at 10:07:10PM +0000, Neil Bothwick wrote:
>> On Tue, 27 Nov 2007 13:53:10 -0800, felix@crowfix.com
wrote:
>>
>>> These web pages use _javascript_; some render so-so without _javascript_,
>>> some don't render at all well.**What I would like is some firefox (or
>>> Konqueror or ...)**command line option to render the page and save it

>>> as any other format -- jpg, pdf, ps, doesn't matter.
>> You could probably do this with a shell script that loads Konqueror with
>> the given URL and send it DCOP command(s) to print.

>
> I have been fooling around with this and following some of the google
> treasure, and it is a decent substitute for the nice simple command
> line options that I want.**But it has a few problems:

>
> 1.**The 'print' DCOP command pops up the print menu and requires at
>**** least one click.**I can set the print type (to PDF file) and the
>**** default file name ahead of time, but I still have to click on

>**** "Print".
>
> 2.**When I pass it the URL to display, it returns immediately, and I
>**** have to insert a sleep to wait before sending the print command.
>**** Is there any way to find out when the page is complete?

>
> 3.**If I put in a one minute pause to allow even the slowest web sites
>**** to fully load, that limits how many of these URLs I can process.
>**** Is there any way to run multiple konqueror sessions at once?

>
> #1 is a real show stopper.**The others are merely annoying.

emerge -av x11-misc/xautomation
xte --help

it allows you to move mouse, click, send keypresses...
finding the right coordinates to click might not be easy (although the

package contains som programs that allow you to find specific pictures
on screen...) but sending the correct**tab and enter sequence should be
enough (I expect just pressing enter in the dialog should be enough)


you should be able to use this also with firefox
send alt-f, p, few tabs to get to the "print to file", space, enter,
name of the file, enter....
)

yoyo
--

gentoo-user@gentoo.org mailing list



--
Ricardo Saffi Marques
Laboratório de Administração e Segurança de Sistemas (LAS/IC)
Universidade Estadual de Campinas (UNICAMP)

Cell: +55 (19) 8128-0435
Skype: ricardo_saffi_marques
Website: http://www.rsaffi.com
 
Old 11-28-2007, 10:10 PM
 
Default Converting HTML to PDF or PS -- DCOP Q now

On Wed, Nov 28, 2007 at 11:06:25PM +0100, YoYo Siska wrote:

> emerge -av x11-misc/xautomation
> xte --help

This could be useful. I have downloaded the firefox sources and am
carwling thru, trying to see how much trouble a customized --print
option would be. It is sleep inducing :-)

--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o
--
gentoo-user@gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 08:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org