|Pathologically Eclectic Rubbish Lister|
Print Bookmarked Webpagesby eibwen (Friar)
|on Aug 01, 2005 at 21:11 UTC||Need Help??|
eibwen has asked for the
wisdom of the Perl Monks concerning the following question:
I've done a bit of preliminary research, but I figured I'd request confirmation before I go waste a ream...
I need to print the websites bookmarked in a particular folder of my firefox bookmarks. Netscape::Bookmarks seems to be able to parse the bookmarks, but I'm having trouble finding an apt printing module. Ideally I'd like to be able to do something like the following:
At this point I should note that I have access to both Windows and Linux, but the printer is currently hooked up to the Windows box. My research thus far has been with regard to printing on Windows, but Linux alternatives are welcome as well.
I did find a few other modules as well, but I guess the real question is how to print a website as a browser renders, as opposed to the raw HTML?
UPDATE: LWP::Simple::getprint($url) and LWP::Simple::getstore($file) appear to offer the functionality I was looking for. While using getstore($file) appears simple enough, how would I use getprint($url) and print the resultant stream?
UPDATE: LWP::Simple merely solves the problem of obtaining a stream; however I have yet to figure out how to render HTML and send the rendered stream to the printer...
UPDATE: Thanks to Re: Win32::OLE printing I managed to figure out how to get Internet Explorer to print without intervention; however I still can't figure out how to get the URLs from my bookmarks list. Netscape::Bookmarks::Category seemed promising, but I can't figure out how to change from the root category to the one I want. URI::Bookmarks::tree_root() appears to be able to change the root to a folder -- but I can't seem to figure out how to represent that folder as a "node"...