|
WinPrint
This is a powerful Print Preview utility. To use it, all you need
to do is create a text file using the WinPrint language, then run
winprint, giving it the name of the text file. WinPrint then shows
it to your users in a print preview window with full zoom, page up,
page down and mouse grabbing. The WinPrint language is loosely based
on HTML with additions that make it ideal as a page layout language.
In This Document:
- Why Use Winprint?
- Why Would I Choose WinPrint Over Adobe Acrobat?
- Why is the Winprint Script different from HTML?
- Let's Get To It! An example of WinPrint Script.
- Download Demo!
- Planned improvements to WinPrint
- Subscribe for Notification
- WinPrint simplifies adding printed output to your
programs. Instead of figuring out all the Windows GDI API commands to draw graphics, just
create a report file and hand it to WinPrint!
- WinPrint gives you a ready Print Preview for all your printed output :
Your users get to see, at any magnification, your program's output. . . before it goes
to the printer!
Adobe Acrobat is superb for distributing pre-defined reports.
However, whatever machine is producing the reports must have a properly licensed copy
of Acrobat Distiller on it... The way this works is that any program can
print directly to the Acrobat driver, and that driver creates a PDF file that can then
be viewed and printed on any machine. This is great for distributing documentation
because the viewer is free: However, No one without Acrobat Distiller can
produce PDF files! In other words, the users of your application would have to have their
own fully licensed copy of Acrobat Distiller if your application was going to use it to preview reports.
Plus, You still need to learn the whole Windows GDI API in order
to produce the output using your own program. ( Most development languages DO provide a simplified interface
to the Windows GDI, however they usually don't provide any kind of print preview.)
With Winprint, however, your programs create a Winprint Compatible "script" file, which Winprint
then will show as a preview, and your users can then choose if they want to print.
HTML is great for what it's designed for: authoring and rendering hypertext documents
on computer screens. However, HTML is not very good for exact placement of text and
graphics on the screen, and it just plain horrible at printing documents.
This is what makes WinPrint necessary when you Care about
how your program's output will look on paper!
The WinPrint language is loosely based on HTML, because HTML is so familiar to many people.
The most obvious difference is that braces { } are used instead of less-than/greater-than
"angled brackets" < > to surround the markup tags. Also, there are MANY added
tags that make the WinPrint Script quick and easy to use for page layout. For example, simply
put the tag {PAGE} wherever you want a page break.
This is an example of some winprint code to produce a report:
{INIT LEFT="0.5in" RIGHT="0.5in" TOP="1in" FONTNAME="Arial" FONTSIZE="12"}{PEN WIDTH=1 FILLSTYLE="SOLID" FILLCOLOR="#FFEEEE"}{OVAL FROM="2in,-0.2in" TO="5.5in,0.5in"}
{ALIGN=CENTER}{FONT NAME="Arial Black" COLOR=#FF0000 SIZE=24}Title of Report{/FONT}{/ALIGN}
{goto left="0.5in"}{Line Dir=S Len=9in}{Goto left="2in"}{Line Dir=S Len=9in}{Goto left="3.5in"}{Line Dir=S Len=9in}
{Line Dir=E Len=9in}{goto left="0.6in"}Column 1{Goto left="2.2in"}Column 2{Goto left="3.6in"}Column 3
{goto left="0.75in"}1{Goto left="2.2in"}First Contact{Goto left="3.6in"}His Address
{PEN FILLCOLOR="#EEFFEE"}{RECT Height="0.2in" WIDTH="8in"}{goto left="0.75iin"}2{Goto left="2.2in"}Second Contact{Goto left="3.6in"}Her Address
{goto left="0.75iin"}3{Goto left="2.2in"}Third Contact{Goto left="3.6in"}Their Address
{goto left="0.75iin"}4{Goto left="2.2in"}Fourth Contact{Goto left="3.6in"}Final Address
{GOTO top="4in" left="2in"}{FONT ROTATE="30deg" SIZE="20"}{B}Whatever you can imagine!{/B}{/FONT}
The first page of the report looks like this:
Page Up and Page Down keys change pages (along with the Page Number Spinner
on the toolbar); Arrow keys move around the current page. You can
also click and drag the page around with the mouse to view the whole page.
Click here to view the complete WinPrint.TXT
documentation using WinPrint itself!
If you don't want to install WinPrint, you can
view the WinPrint documentation in PDF using Acrobat.
- v3.00.1
- http: WinPrint can now load any report file available on the web using http!
- v3.00
- ActiveX: WinPrint is now an ActiveX/COM Server! You can use
automation to open WinPrint, and programmatically load your report; you
can even print the report, and close WinPrint down if you want!
- v2.22
- Rotated Text: Place text anywhere on the page at any rotation
specified in Degrees: Not Just 0 or 90° but anywhere in-between!
- v2.21
- Find: Now your user can search for text througout the
WinPrint report. Each occurance of found text is highlighted,
and the user can press "A" ( for Find Again ) and will
be taken straght to the next occurance!
- The page rendering engine currently starts at the beginning of the
document and scans all the tags in order to render each page
while viewing. This makes viewing large ( more than 30 page )
documents frustrating, but possible (it takes about 5-10 seconds
on a 300MHz machine to render the 20th page). This doesn't affect
printing.
- Internal "hyperlinks"
- A browser plugin version of WinPrint so that Web Server CGI programs
can produce Winprint compatible files for printing locally.
- The ability for WinPrint to produce PDF files directly from the WinPrint report.
|