Skip to content

Commit

Permalink
Documentation updates.
Browse files Browse the repository at this point in the history
Now have a release version of 1.8.

Added CGI examples.

Dropped insert pages (wouldn't come out right)
  • Loading branch information
michaelrsweet committed Nov 16, 1999
1 parent 248e4d8 commit e53aeb0
Show file tree
Hide file tree
Showing 16 changed files with 491 additions and 1,107 deletions.
19 changes: 19 additions & 0 deletions cgi-bin/topdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
#
# Sample CGI shell script to convert the named HTML file to PDF on-the-fly.
#
# Usage: http://www.domain.com/path/topdf/path/filename.html
#
# The filename on the command-line is relative to the document root of the
# server. This script is slightly more secure than the topdf.cgi script
# since it will use the translated pathname coming from the HTTP server.
# Just make sure your HTTP server is secure...
#

docroot=`dirname $PATH_TRANSLATED`
cd $docroot

echo "Content-Type: application/pdf"
echo ""

htmldoc -t pdf --webpage $PATH_TRANSLATED
24 changes: 24 additions & 0 deletions cgi-bin/topdf.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <stdio.h>
#include <stdlib.h>


/* topdf() - convert a HTML file to PDF */
FILE *topdf(const char *filename) /* HTML file to convert */
{
char command[1024]; /* Command to execute */


puts("Content-Type: application/pdf\n");

sprintf(command, "htmldoc -t pdf --webpage %s", filename);

return (popen(command, "w"));
}


/* topdf2() - pipe HTML output to HTMLDOC for conversion to PDF */
FILE *topdf2(void)
{
puts("Content-Type: application/pdf\n");
return (popen("htmldoc -t pdf --webpage -", "w"));
}
18 changes: 18 additions & 0 deletions cgi-bin/topdf.cgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
#
# Sample CGI shell script to convert the named HTML file to PDF on-the-fly.
#
# Usage: http://www.domain.com/path/topdf.cgi?/path/filename.html
#
# The filename on the command-line is relative to the document root of the
# server. This doesn't prevent malicious users from accessing files they
# might not otherwise be able to access!
#

docroot=/insert/directory/here
cd $docroot

echo "Content-Type: application/pdf"
echo ""

htmldoc -t pdf --webpage $1
6 changes: 6 additions & 0 deletions cgi-bin/topdf.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sub topdf(filename);

sub topdf {
print "Content-Type: application/pdf\n\n"
system htmldoc -t pdf --webpage $filename
}
6 changes: 3 additions & 3 deletions config.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* "$Id: config.h.in,v 1.4 1999/11/10 15:59:23 mike Exp $"
* "$Id: config.h.in,v 1.5 1999/11/16 21:53:08 mike Exp $"
*
* Configuration file for HTMLDOC.
*
Expand Down Expand Up @@ -49,7 +49,7 @@
* What is the version number for this software?
*/

#define SVERSION "1.8b5"
#define SVERSION "1.8"


/*
Expand All @@ -66,6 +66,6 @@
#define MAX_ROWS 1000

/*
* End of "$Id: config.h.in,v 1.4 1999/11/10 15:59:23 mike Exp $".
* End of "$Id: config.h.in,v 1.5 1999/11/16 21:53:08 mike Exp $".
*/

101 changes: 89 additions & 12 deletions doc/1-install.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,82 @@ <H3>Requirements</H3>

</UL>

<H3><A NAME="VISUALC">Compiling with Visual C++</A></H3>
<H3>Configuring the UNIX Source</H3>

<I>HTMLDOC</I> uses a configuration script produced by GNU autoconf to
configure itself for your system. If your ANSI C compiler is not called
<VAR>cc</VAR> or <VAR>gcc</VAR>, set the <CODE>CC</CODE> environment
variable to the name and path of your ANSI C compiler:

<UL><PRE>
% <KBD>setenv CC /path/to/compiler</KBD> [C Shell]
% <KBD>CC=/path/to/compiler; export CC</KBD> [Born/Korn Shell]
</PRE></UL>

Similarly, if your C++ compiler is not called <VAR>CC</VAR>, <VAR>gcc</VAR>,
<VAR>c++</VAR>, or <VAR>g++</VAR>, set the <CODE>CXX</CODE> environment
variable to the name and path of your C++ compiler:

<UL><PRE>
% <KBD>setenv CXX /path/to/compiler</KBD> [C Shell]
% <KBD>CXX=/path/to/compiler; export CXX</KBD> [Born/Korn Shell]
</PRE></UL>

Finally, if the FLTK library is not installed in a standard location for
your compilers, set the <CODE>CFLAGS</CODE>, <CODE>CXXFLAGS</CODE>, and
<CODE>LDFLAGS</CODE> environment variables to point to the FLTK library:

<UL><PRE>
% <KBD>setenv CFLAGS -I/path/to/fltk</KBD> [C Shell]
% <KBD>setenv CXXFLAGS -I/path/to/fltk</KBD>
% <KBD>setenv LDFLAGS -L/path/to/fltk/lib</KBD>

% <KBD>CFLAGS=-I/path/to/fltk; export CFLAGS</KBD> [Born/Korn Shell]
% <KBD>CXXFLAGS=-I/path/to/fltk; export CXXFLAGS</KBD>
% <KBD>LDFLAGS=-L/path/to/fltk/lib; export LDFLAGS</KBD>
</PRE></UL>

Then run the following command to configure <I>HTMLDOC</I> for
installation in the default directories:

<UL><PRE>
% <KBD>./configure ENTER</KBD>
</PRE></UL>

The default configuration will install <I>HTMLDOC</I> in the
<VAR>/usr/bin</VAR> directory with the data files under
<VAR>/usr/share/htmldoc</VAR> and the documentation and on-line help
under <VAR>/usr/share/doc/htmldoc</VAR>. Use the <CODE>--prefix</CODE>
option to change the installation prefix to <VAR>/usr/local</VAR>:

<UL><PRE>
% <KBD>./configure --prefix=/usr/local ENTER</KBD>
</PRE></UL>

<H3>Compiling under UNIX</H3>

<I>HTMLDOC</I> is built from a Makefile in the distribution's main
directory. Simply run the "make" command to build <I>HTMLDOC</I>:

<UL><PRE>
% <KBD>make ENTER</KBD>
</PRE></UL>

If you get any fatal errors please send a copy of the make/compiler
output to "<A HREF="mailto:[email protected]">[email protected]</A>"
for assistance. Please note the version of <I>HTMLDOC</I> that you are
using as well as any pertinent system information (operating system, OS
version, compiler, etc.)

<H3>Installing under UNIX</H3>

To install <I>HTMLDOC</I> simply run the "make install" command as root:

<UL><PRE>
% <KBD>make install ENTER</KBD>
</PRE></UL>

<H3>Compiling with Visual C++</H3>

A Visual C++ 6.0 workspace file and associated project files are
included in the source distribution under the "visualc" directory. Open
Expand All @@ -100,21 +175,23 @@ <H3>Installing with Visual C++</H3>
6. The "visualc/HTMLDOC" directory contains the installation information
for <I>HTMLDOC</I> needed to build a binary distribution with InstallShield.

<H3>Compiling under UNIX</H3>
<P>To install <I>HTMLDOC</I> without InstallShield, create an
installation directory and copy the <VAR>htmldoc.exe</VAR> executable,
the <VAR>afm</VAR> directory, the <VAR>data</VAR> directory, and the
<VAR>doc</VAR> directory to it.

<P><I>HTMLDOC</I> is built from a Makefile in the distribution's main
directory. Simply run the "make" command to configure and build
<I>HTMLDOC</I>.
<P>Then use the <VAR>regedit</VAR> program to create the following two string
entries:

<P>If you get any fatal errors please send a copy of the make/compiler
output to "<A HREF="mailto:[email protected]">[email protected]</A>"
for assistance. Please note the version of <I>HTMLDOC</I> that you are
using as well as any pertinent system information (operating system, OS
version, compiler, etc.)
<DL>

<H3>Installing under UNIX</H3>
<DT><CODE>HKEY_LOCAL_MACHINE\Software\Easy Software Products\HTMLDOC\data</CODE>
<DD>C:\installation\directory

<DT><CODE>HKEY_LOCAL_MACHINE\Software\Easy Software Products\HTMLDOC\doc</CODE>
<DD>C:\installation\directory\doc

To install <I>HTMLDOC</I> simply run the "make install" command as root.
</DL>

</BODY>
</HTML>
Loading

0 comments on commit e53aeb0

Please sign in to comment.