Html2Printf Version 1.4

[Key Features|Using Html2Printf|Getting Html2Printf|Tech Info|Other Products|Register Html2Printf]

Most of us developers have the need to take a file and put it into "printf" statements for output to the screen. With the advent of the World Wide Web and home pages, we have a number of tools to create web pages. Common Gateway Interface (CGI) programs are used to react to html form data, perform some backend function (such as look up data in a database) and create on-the-fly html for display back to the calling web browser. Unfortunately, creating that html for the CGI output is usually done by hand and is very tedious and time-consuming. The tools used to create web pages don't do us very good when their output cannot be readily used for CGI output. Html2Printf helps us in that aspect. It can take any text file and output a file with wrapper printf statements around each line. These formatted output lines can be cut and pasted into a 'C' CGI program file. In this manner you can use the web page development tools you like for developing the CGI output you want.


Html2Printf shown as it is initially.


KEY FEATURES

Back to the Top


How to Use Html2Printf

Html2Printf is easy to use. It starts with a WHITE client area (where you would drag and drop your file to. There currently are three (3) main menu areas: FILE,OPTIONS, and HELP. The FILE menu is only for exitting the program. The current OPTIONS are: Set Printf Statement and Set Output File Extension. By default the output file is the same name and directory of the input file except for the output file extension. The default extension is: .dat. Example: input file: c:\html_area\index.html would produce an oututput file of c:\html_area\index.dat . The Set Printf Statement allows the user to customize the output file contents. Default beginning statement is: printf(. and the default ending statement is: );. This would take an input line of: This is a test and produce an output line of: printf("This is a test\n");.
Starting with version 1.4, you can copy text and paste it onto Html2Printf. The text will be formatted just as a file would and the formatted text will be put back onto the clipboard. You can just 'paste' the formatted text into your document.
A complete example follows:

Input File (Generated using FrontPage 97) :

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; iso-8859-1">
<title>TGA DP Project</title>
<meta name="FORMATTER" content="Microsoft FrontPage 2.0">
</head>

<frameset rows="19%,81%">
<frame src="header.htm" name="Header">
<frame src="main.htm" name="main">
<noframes>
<body>
<p>This web page uses frames, but your browser doesn't
support them.</p>
</body>
</noframes>
</frameset>
</html>

Output File:

printf("<!DOCTYPE HTML PUBLIC '-//IETF//DTD HTML//EN'>\n");
printf("\n");
printf("<html>\n");
printf("\n");
printf("<head>\n");
printf("<meta http-equiv='Content-Type' content='text/html; iso-8859-1'>\n");
printf("<title>TGA DP Project</title>\n");
printf("<meta name='FORMATTER' content='Microsoft FrontPage 2.0'>\n");
printf("</head>\n");
printf("\n");
printf("<frameset rows='19%,81%'>\n");
printf(" <frame src='header.htm' name='Header'>\n");
printf(" <frame src='main.htm' name='main'>\n");
printf(" <noframes>\n");
printf(" <body>\n");
printf(" <p>This web page uses frames, but your browser doesn't\n");
printf(" support them.</p>\n");
printf(" </body>\n");
printf(" </noframes>\n");
printf("</frameset>\n");
printf("</html>\n");

Back to the Top


PRICING AND AVAILABILITY

Html2Printf
FREEWARE.

Back to the Top


How to Obtain Html2Printf

You can obtain Html2Printf here.
If you cannot access .exe files, here it is in a .zip file.

Back to the Top


Registering Html2Printf

Even though Html2Printf is FREEWARE, Please register your copy with the author. You can register when installing html2printf or when you use it.

Back to the Top


Technical Information

Html2Printf was developed by Martin E. Haring. The code is C++ without MFC. I am planning only to release for Windows95 and NT 4.0. (The program will work on both platforms).

Back to the Top


More Products from the author

Back to the Top


Author: Martin E. Haring
e-mail: mehsw@hp-h.us
URL: members.tripod.com/mharing

Copyright © 1997-2003 by Martin E. Haring. All rights reserved.
All specifications subject to change without notice.
Last Updated January 05, 2004.
Other products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.