HTML Commands that supports the aspEasyPDF Professional version.

The HTML support on the aspEasyPDF Pro is for an easy, common and faster way to develop PDF documents, you can reduce the ASP code in a 60% to 80% and make it faster as there are single sentences that you use on the ASP and all the work is transferred to the component. Some parts of the component as been done in pure assembler to do it faster than using scripting technologies.

As the intention is to help to reduce the coded size and for faster developing, don't expect to get the same output as you see on the Internet Explorer or Netscape. Is so difficult to make it look on the same way, think about Opera and Internet Explorer, the rendering are quite the same but you see a lot of differences when loading pages on it, different standards on the Html, supports different html versions, and some companies adds a non html standard syntax.

Our intention is to develop a product that will increase on functionality and make a closer look as you see on the Internet Explorer or NetScape.

Those are the html tags that are fully supported:

BODY - Sets the background color if specified

TITLE - Sets the title of the document

H1 to H6 - Headers

HR - Lines ( Size and Color options )

BR  - BR/ - Branch Line

U - Underline tag

I - EM - Intalic font

B - Bold Tag, also the STRONG is supported

FONT - To specify a different font to be used, it accepts the FACE, SIZE and color parameters

P - Paragraph, accepts the ALIGN parameter (Left, Right and Center)

SMALL - Small font

BLOCKQUOTE - Add consecutive quotes

UL - OL - LI - Bullets ( You can use START and TYPE parameters )

CENTER - To center text

A - Adds a Link. Supports outside link, file link ( file:/// ) and inside link #.

IMG - Adds an image. Supports outside link http and file link ( file:/// ).

TABLE - Supports tables. It does not support the rowspan. All other properties are supported.
( Note: Tables structure must be completely written in a full variable to the AddHTML, you can not call several times the AddHTML to draw one table )

SCRIPT - All information from the script will be ignored.

Full support to the ISO Latin-1 Character Set entities and you can use decimal entities ( &#xx; )

What tags are not supported:

- Table inside table are not supported and will raise with an exception when trying to render the table.

- Rowspan on tables.

- CSS, Style sheet.

Additional tags not standard from HTML but useful for the aspEasyPDF:

<!-PAGE BREAK> and  <!-PDF.ADDPAGE>
   
Forces to add a new page.

<!-PDF.MOVETOPAGE>
   Moves to a specific page, use the Value to set the page to jump.
   F.E. to jump on second page: <!-PDF.MOVETOPAGE Value="2">

<!-PDF.ADDBARCODE>
   Draws a Barcode. You have parameters for X, Y, Height, Type and Value. If you don't set the Cursor position for X, Y then it will use the actual position.
   Draw a barcode: <!-PDF.ADDBARCODE X=100 Y=200 Height=30 Type=2 Value=123>

<!-PDF.ADDTEXTPOS>
  
Powerful function to add text anywhere. Parameters X, Y for cursor and Value for the text to display.
   Example: <-PDF.ADDTEXTPOS X=400 Y=400 Value="Hello world">

<!-PDF.SETPROPERTY>
  Alters an internal property of the aspEasyPDF. See instructions on how to use the SetProperty. Parameters are ID and Value.
  Example that sets the author document to MITData:  <!-PDF.SETPROPERTY ID=302 Value="MITData, S.C.P.">   

Some examples to see how it works:

<% 
' Create the component
set PDF = server.createobject("aspPDF.EasyPDF")

' Set the actual font, indeed you can also set it by HTML tags
PDF.SetFont "F1", 12, "#000000"
PDF.AddHTML "<p>The html command are implemented to allow a fast and easy use to draw on <b>PDF</b>. " & _
"It has not been done to make an <u>exact view</u> as you see on the Internet Explorer</p>"
'PDF.AddHTML "<p><font face=""F1"" size=""2"">This only a demo to see how it works.</font><br>HTML Commands supported:</p>"
PDF.AddHTML "<p>Only paragraphs, bold, italic, color and a bit more, this is only the <u>beginning</u> as this demonstrates" &_
"html commands that are supported, now until the final release It will have the most important commands</p>"
PDF.AddHTML "<p align=""center"">ENJOY!</p>"
PDF.AddHTML "<p><a href=""www.mitdata.com"">Visit our page</a></p>"

PDF.BinaryWrite
' destroy it
set pdf = nothing
%>

Other easy functions:

<% 
' Create the component
set PDF = server.createobject("aspPDF.EasyPDF")

' Adds html from an URL, it also enables you to run ASP pages dynamically
PDF.AddHTML "http://www.mitdata.com/AspEasy/pdf_html_Support.htm"

PDF.BinaryWrite
' destroy it
set pdf = nothing
%>

And now direct from a server file:

<% 
' Create the component
set PDF = server.createobject("aspPDF.EasyPDF")

' Adds html from a File
PDF.AddHTML "file:///C:/inetpub/AspEasy/pdf_html_Support.htm"

PDF.Save "c:\inetpub\inetpub\aspEasyPDF.pdf"
' destroy it
set pdf = nothing
%>