c# - What page-image generating technology should I use? -


I'm creating a desktop application that presents its human-readable production as a xHTML displayed in webbriser control is. After all, this output is being converted from an XHTML file into a image image in an imaging system. Unlike XHTML documents, the document image should be divided into physical pages; Extra - and this is the part that is killing me - these pages need to have a header and footer.

As much as I would like, I just can not print the webbrowser in the file - headers / footer options that support it are not enough sophisticated anywhere, so I am trying to figure out that What is the right technique to make these images?

It seems to me (though it is not mandatory) that what I will do is produce PDF versions of HTML documents (so that I can add headers and footers) and then the PDF to TIFF form What I'm considering if I'm presenting the imaging system that is the final form:

  • Use any type of XHTML-to-PDF conversion software This is The problem with that is that without a lot of evaluation and testing, I have not figured out that if I have seen the products I need, which is to take existing XHTML documents, they have the ability to decorate with headers. And footer and endorsed them.

  • Use XSL-FO to create PDFs. Being a ninja-level XSLT geek here (even in the first place I'm producing XHtml) helps, but it still looks like a weird and slow motion with many parts. Apart from that it means that I am sticking to a big clanky java program between my good clean nat system, although I am definitely enough for an adult, if this is the correct answer.

  • Use some other techniques I have not considered yet, such as latex. There may be some miraculous page-imaging tools that convert XHTML directly to TIFF with page headings and footers. It would be ideal.

My primary concerns are:

  • I am creating a commercial product; The technology I use should be affordable and helpful. It is not necessary to be free.

  • I do not want to lose a rabbit hole for this three-month beating on this stuff to work. It looks like a problem with ease, where I can evaluate and dismiss many tools.

  • Whatever I adopt, there is a need for relatively immunity to change. XHTML For the full reason, I am using XSLT and I am creating XHTML in the first place. That the document I am producing is being mobilized using business rules that change all the time.

I have spent a lot of time searching for alternatives and have not got anything that is obviously the answer. But perhaps one of the right people have already solved this problem, and if so, then I want to stand on your shoulders.

edit (2010-11-28 12:30 am PST) If you download your code, +1 this answer. I have noticed that my codepex samples have been downloaded hundreds of times. This code is not superb, but it works as a great starting point, which includes a lot of links to source support. Thanks! + Tom Edit (2009-03-29 9:00 पूर्वाह्न PST).
Edit (2009-03-23 ​​12:30 PM PST, published CodePlex) I developed a solution for it and posted it. The published WPF is written using the MVVP pattern. TIFF files (for one page per page) are outputs for C: \ Temp \ XhtmlToTiff XAMML and XPS formats are equally created A compiled, installable version


Is available on "Have you tried"? It is a software-only printer that generates endorsed output from various sources including web pages.

In general, there is an SDK to work with XPS documents and Open XML docs. Here is an article of Beth Mossi: "".

+ tom


Comments