Re: [gentoo-user] Converting HTML to PDF or PS

2007-11-28 Thread Ralf Stephan
You wrote 
 I need to convert web pages to PDF files under program control,

* app-text/htmldoc [N 1.8.27] target
Convert HTML pages into a PDF document
-fltk ssl

Use flags:

* fltk: Adds support for the Fast Light Toolkit gui 
interface
* ssl:  Adds support for Secure Socket Layer connections


ralf
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Converting HTML to PDF or PS

2007-11-28 Thread felix
On Wed, Nov 28, 2007 at 11:14:33AM +0100, Ralf Stephan wrote:
 You wrote 
  I need to convert web pages to PDF files under program control,
 
 * app-text/htmldoc [N 1.8.27] target
 Convert HTML pages into a PDF document
 -fltk ssl

I tried, but it has too many deficiencies, and doesn't support
javascript.  The pages don't render well enough.

 * fltk: Adds support for the Fast Light Toolkit gui 
 interface

I need to it run under program control, not a gui.  I could do gui
with firefox.

-- 
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
 Felix Finch: scarecrow repairman  rocket surgeon / [EMAIL PROTECTED]
  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
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Converting HTML to PDF or PS -- DCOP Q now

2007-11-28 Thread felix
On Tue, Nov 27, 2007 at 10:07:10PM +, Neil Bothwick wrote:
 On Tue, 27 Nov 2007 13:53:10 -0800, [EMAIL PROTECTED] 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 / [EMAIL PROTECTED]
  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
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Converting HTML to PDF or PS -- DCOP Q now

2007-11-28 Thread Neil Bothwick
On Wed, 28 Nov 2007 08:37:16 -0800, [EMAIL PROTECTED] 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!


signature.asc
Description: PGP signature


Re: [gentoo-user] Converting HTML to PDF or PS -- DCOP Q now

2007-11-28 Thread felix
On Wed, Nov 28, 2007 at 05:18:03PM +, Neil Bothwick wrote:
 On Wed, 28 Nov 2007 08:37:16 -0800, [EMAIL PROTECTED] 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 / [EMAIL PROTECTED]
  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
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Converting HTML to PDF or PS -- DCOP Q now

2007-11-28 Thread YoYo Siska
[EMAIL PROTECTED] wrote:
 On Tue, Nov 27, 2007 at 10:07:10PM +, Neil Bothwick wrote:
 On Tue, 27 Nov 2007 13:53:10 -0800, [EMAIL PROTECTED] 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
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Converting HTML to PDF or PS -- DCOP Q now

2007-11-28 Thread Ricardo Saffi Marques
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 [EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED] wrote:
  On Tue, Nov 27, 2007 at 10:07:10PM +, Neil Bothwick wrote:
  On Tue, 27 Nov 2007 13:53:10 -0800, [EMAIL PROTECTED] 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
 --
 [EMAIL PROTECTED] 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*


Re: [gentoo-user] Converting HTML to PDF or PS -- DCOP Q now

2007-11-28 Thread felix
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 / [EMAIL PROTECTED]
  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
-- 
[EMAIL PROTECTED] mailing list



[gentoo-user] Converting HTML to PDF or PS

2007-11-27 Thread felix
I need to convert web pages to PDF files under program control,
perhaps from cron, perhaps a backgrounded batch job.  An X window
enviornment could probably be set up, but I'd prefer not going thru
that hassle.  Point and click manual intervention just won't do.
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.  Cups-pdf sounds
like it might help, if I could use command line options to tell
firefox to print the page.  I see that firefox 3 will have a print to
PDF option, and that might be good enough, but it's not available now,
and there'd need to be some way of starting firefox and telling it to
print under program control.

Firefox has some command line options to help, such as height and
width.  And none of them (that I can find) do anything useful like
print to pdf and exit.

I am open to any suggestions which can be automated.  If a perl
program could run firefox as a child under X and feed it X input, or a
perl CPAN module which understands javascript, or even if there are
commercial programs which do this, I am all ears.

-- 
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
 Felix Finch: scarecrow repairman  rocket surgeon / [EMAIL PROTECTED]
  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
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Converting HTML to PDF or PS

2007-11-27 Thread felix
On Tue, Nov 27, 2007 at 02:14:50PM -0800, [EMAIL PROTECTED] wrote:

 Can you expand on that?  What are DCOP commands and how would I sent
 them to Konqueror?  Is this easy enough with, say, Perl?

Never mind, google is my friend.  This looks like it might do th
etrick.  I have to find some way of using DCOP to print to PDF, and I
have to worry about setting up a KDE environment, but it looks doable.

-- 
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
 Felix Finch: scarecrow repairman  rocket surgeon / [EMAIL PROTECTED]
  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
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Converting HTML to PDF or PS

2007-11-27 Thread felix
On Tue, Nov 27, 2007 at 10:07:10PM +, Neil Bothwick wrote:
 On Tue, 27 Nov 2007 13:53:10 -0800, [EMAIL PROTECTED] 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.

Can you expand on that?  What are DCOP commands and how would I sent
them to Konqueror?  Is this easy enough with, say, Perl?

-- 
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
 Felix Finch: scarecrow repairman  rocket surgeon / [EMAIL PROTECTED]
  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
-- 
[EMAIL PROTECTED] mailing list