Print xhtml from command line?
I'm working with a client who has a print process that essentially prints hundreds of html pages nightly. The tool they use now is from bersoft called HTMLPrint. Recently, the vendor of the HTML documents upgraded everything to XHTML and uses Anchor tags (basically merging 10 files into 1).
I've been tasked with the job to figure out how to get the process back to what it was using the XHTML docs.
Basically, everynight we query a database to get a list of htm doc paths and send that off to HTMLPrint, however HTMLPrint only works with HTML 3.2, and is completly failing with XHTML.
If anyone has any idea how we can do this, that'd 开发者_JS百科be great. I've looked into several tools, but none of them appear to be what I want to do.
This is a similar post that I read through, but not exactly the process I am looking for.
Can I print html files (with images, css) from the command-line?
Thanks!
Without going too far (and noting that HTMLPrint's version history ends at Jan 2010), I found another article mentioning alternatives for printing html:
- Print Wide HTML 1.0.0
- PDFArea HTML to PDF Converter 2.0
- ASP Printer COM 2.1
- ASPcodePrint 1.5.15
- Batch Printing 1.0
- LIKSE32 3.30
- Smart Print Control 4.1
- ONEView 1
- Print Folder 1.01
- FlexCell Grid Control for .NET 3.0.5
Perhaps one of them would work for XHTML?
I fully admit I didn't exhaust the list for what can/can not do XHTML, but though I'd offer up my findings on alternatives.
The other option is maybe create your own printer using the WebBrowser control and feeding it the pages necessary to be printed, and calling the Print method yourself.
You can convert XHTML into PDF and then print the PDF: How to convert XHTML to PDF in C#
精彩评论