Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 151481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:27:23+00:00 2026-05-11T09:27:23+00:00

I’m building a desktop application right now that presents its human-readable output as XHTML

  • 0

I’m building a desktop application right now that presents its human-readable output as XHTML displayed in a WebBrowser control. Eventually, this output is going to have to be converted from an XHTML file to a document image in an imaging system. Unlike XHTML documents, the document image has to be divided into physical pages; additionally – and this is the part that’s killing me – there need to be headers and footers on these pages.

Much as I would like to, I can’t simply make the WebBrowser print to a file – the header/footer options it supports aren’t anywhere near sophisticated enough. So I’m casting about trying to figure out what the right technology is for generating these images.

It seems likely to me (though it’s not mandatory) that what I’ll end up doing is producing PDF versions of the HTML documents (so that I can add headers and footers) and then rendering the PDFs as TIFFs, which is the ultimate format that the imaging system wants. So what I’m considering:

  • Use some kind of XHTML-to-PDF conversion software. The problem with this is that without doing a lot of evaluation and testing I can’t figure out if the products I’ve looked at even have the ability to do what I need, which is to take existing XHTML documents, decorate them with headers and footers and paginate them.

  • Use XSL-FO to generate the PDFs. Being a ninja-level XSLT geek helps here (that’s how I’m producing the XHTML in the first place), but it still seems like an awkward and slow solution with a lot of moving parts. Also this means I’m sticking a big clunky Java program into the middle of my nice clean .NET system, though I’m certainly enough of a grownup to do that if it’s the right answer.

  • Use some other technology that I haven’t even thought of yet, like LaTeX. Maybe there’s some miraculous page-imaging tool that turns XHTML directly into TIFFs with page headers and footers. That would be ideal.

My primary concerns are:

  • I’m building a commercial product; whatever technology I use needs to be affordable and supportable. It doesn’t have to be free.

  • I don’t want to disappear down a rabbit hole for three months banging on this stuff to get it to work. This intuitively seems like the kind of problem space where I can lose a lot of time just evaluating and rejecting tools.

  • Whatever solution I adopt needs to be relatively immune to formatting changes in the XHTML. The whole reason I’m using XSLT and producing XHTML in the first place is that the documents I’m producing are being dynamically assembled using business rules that change all the time.

I’ve spent a lot of time searching for alternatives and haven’t found anything that’s obviously the answer. But maybe one of you fine people has already solved this problem, and if so, I would like to stand on your shoulders.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:27:24+00:00Added an answer on May 11, 2026 at 9:27 am

    Edit (2010-11-28 12:30 PM PST) Please +1 this answer if you download my code. I notice my Codeplex sample has been downloaded hundreds of times. The code isn’t spectacular, but it works as a great starting point, with lots of links to source help included. Thanks! +tom Edit (2009-03-29 9:00 AM PST) Posted sample conversion.
    Edit (2009-03-23 12:30 PM PST, published to CodePlex) I developed a solution for this and posted it to CodePlex. The published version 2.0 is written using the WPF MVVP pattern. TIFF files (one per page) are output to c:\Temp\XhtmlToTiff. XAML and XPS formats are created as well. A compiled,installable version is available at CricketSoft.com


    Have you tried the ‘Microsoft XPS Document Writer‘? This a software-only printer that generates paged output from a variety of sources, including web pages.

    There is an SDK for working with XPS documents and Open XML docs in general. Here is a How-to article by Beth Massi: ‘Accessing Open XML Document Parts with the Open XML SDK‘.

    +tom

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 88k
  • Answers 89k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer For inheritance you can have a single class with multiple… May 11, 2026 at 5:48 pm
  • Editorial Team
    Editorial Team added an answer How did you try tacking last() on? I think this… May 11, 2026 at 5:48 pm
  • Editorial Team
    Editorial Team added an answer Provide a literal wide string and use the secure copy… May 11, 2026 at 5:48 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.