Question: I'm currently developing an application that uses private Windows messages to trigger (some) code execution (for programmers: defined as [WM\_USER](https://msdn.microsoft.com/en-us/library/windows/desktop/ms644931%28v=vs.85%29.aspx) + n).

I would like to track the order in which some of these are processed by the OS and handled in my app. I can not find sufficient facilities in my IDE to do so.

A free tool would be nice.

FWIW I Develop in Delphi XE2

Answer: 
I'll repeat some existing answers with extra comments:

* [`mupdf`](https://github.com/ArtifexSoftware/mupdf): wins in simplicity if you are fine with occasional (cosmetically) lossy conversions
* [pdf2htmlEX](https://github.com/pdf2htmlEX/pdf2htmlEX): wins in terms of fidelity at the expense of larger HTML size and unreadable HTML markup (js-based); suitable for PDF files with complex graphics and custom fonts
* [pdftohtml](https://pdftohtml.sourceforge.net/): mentioning as an option that should probably be skipped as it does not support PDF version higher than v1.5 and produces a generally poor result; yet, it's available in most linux distros for example as part of the [`poppler-utils`](https://packages.debian.org/sid/poppler-utils) in ubuntu/debian and might still be suitable for certain use cases
* [google docs](https://docs.google.com): not offline, not open-source, freeish, including for the sake of completeness: if you drop a PDF file into your [google drive](https://drive.google.com), right-click it ➔ `Open with` ➔ `Google Docs` then it will be converted to an editable document that can be saved from Google Docs via `File` ➔ `Download` to Web page (zipped) or MSWord formats
Calibre is a free open source program for Windows/Mac/Linux that is able to quickly convert PDF files to an HTMLZ archive. The HTMLZ archive contains an index.html file inside which is the converted .html file. It also contains a style.css file for the formatting and sometimes may contain an images folder that has images inside.

I was surprised at how good a job Calibre does at converting PDF books to .html when I tried it. It preserved the text formatting and didn't make any mistakes about preserving the line endings. When I tried Calibre on a magazine or on a text document that wasn't well formatted to begin with, the results were unacceptable unless the PDF file was converted to plain text and then manually edited in a word processor and saved as an .html file. This gives perfect results, but is very time-consuming. Calibre can't convert every PDF file well, but it does a good job most of the time so it is worth a try.