Printing many web pages to PDF

kaspaas

Expert Member
Joined
Aug 6, 2003
Messages
3,732
Reaction score
6
Location
Home: Wapadrant Office: Lyttelton
Hi,

I have a long list (around 500 and growing) of URL's which I need to download and print as a single PDF document.

At the moment I copy the URL, paste it into Firefox, download it, print it to PDF creator, and do the next one.

Is there a way to automate this?

Thanks
 
I would love to know if this could be done (automated) ... kaspaas - do let us know if you find something. I have the same problem.
 
You are looking for HtmlDoc. You can trail it, which works fine. Just add all the URLs in the order you need it, and it will create the PDF according to it.
 
I tried a HTTP link and it does not work......any advice, and I see the link has spaces in code format such a %20 for a space?
 
Thanks all,

I loaded AutoIT and with PDFCreator the following primitive script does the basics.

Improvements will be welcomed.

#include <IE.au3>
dim $a
; ensure that PDF creator is set as default printer

$file = FileOpen("list.txt", 0)

; Check if file opened for reading OK
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf

$line = FileReadLine($file)
;_IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = -1]]]]] )

$oIE = _IECreate ($line,0,1,1,0)
sleep(500); separate Create and Action
_IEAction ($oIE,"printdefault")
sleep(20000) ; wait for PDFcreator to start give it enough time unless you want to close many instances
send("!w")
sleep(1000) ; give some time for printing



While 1
$line = FileReadLine($file)
If @error = -1 Then ExitLoop
$a = $line
_IENavigate ($oIE, $a)
sleep(500)
_IEAction ($oIE,"printdefault")
sleep(1000)
Wend


FileClose($file)

MsgBox(4096,"Finished", "Finitum")
 
Top
Sign up to the MyBroadband newsletter
X