perlquestion
eibwen
<p>I've done a bit of preliminary research, but I figured I'd request confirmation before I go waste a ream...</p>
<p>I need to print the websites bookmarked in a particular folder of my firefox bookmarks. [cpan://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:</p>
<p><blockquote><code>PrintURI("http://somesite.tld/page.html");</code></blockquote></p>
<p>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.</p>
<ul><li>[cpan://Win32::Printer::Direct] will print a file, but a URI? I imagine I could rig an [cpan://LWP::Simple] to create a stream; however I'd like to print the website, not the raw HTML, et all.</li>
<li>[cpan://Printer] is cross platform, but seems a bit more raw</li></ul>
<p>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?</p>
<p><b>UPDATE:</b> [cpan://LWP::Simple]<code>::getprint($url)</code> and [cpan://LWP::Simple]<code>::getstore($file)</code> appear to offer the functionality I was looking for. While using <code>getstore($file)</code> appears simple enough, how would I use <code>getprint($url)</code> and print the resultant stream?</p>
<p><b>UPDATE:</b> [cpan://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...</p>
<p><b>UPDATE:</b> Thanks to [id://338787] 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. [cpan://Netscape::Bookmarks::Category] seemed promising, but I can't figure out how to change from the root category to the one I want. [cpan://URI::Bookmarks]<code>::tree_root()</code> 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"...</p>