PDFActiveX  Ver. 0.7  i-Logic Software  www.i-logic.com


**************************************************
The installation program will register PDFActiveX.dll as a COM server so it can be found by other programs.

This can be done manually by going to start menu - Run, and enter command:
regsvr32 "c:\program files\i-Logic\PDFActiveX\PDFActiveX.dll"

It can be unregistered by:'
regsvr32 "c:\program files\i-Logic\PDFActiveX\PDFActiveX.dll" /unregister

******************************************************


Differences from ver0.5: 
SetTopOrigin is now SetYOrigin.
Default coordinate system is 0,0 at top left.
New is now NewDoc.
No functions have Doc as a parameter - only one document can be created for each instance of PDFActiveX.
GetFont has parameter for code page.


***************************************************

PDFActiveX: An ActiveX component for drawing and saving Adobe PDF files. This can be used by any programming language that can use ActiveX controls. Commands consist of text and line drawing. Can load jpg and png images. 
The process consists of drawing the text at X and Y coordinates on the page, and then saving the page to a file.
Commands:
New - The start of a new PDF document. Returns Doc.
AddPage(Doc) - Adds a new page to the document
InsertPage( Page) - Inserts and return a new page before Page.
AddTextArea( Page, Text, Left, Top, Width, Height, Align, Font, Size, Length) - Draws text within a rectangular area. The text is word wrapped to fit into the area, and is clipped where it doesn't fit. 
AddLine( Page, X1, Y1, X2, Y2) - Draws a line between the two points.
AddRectangle( Page, X, Y, Width, Height) - Draws a rectangle on the page at the coordinates.
SaveToFile( Doc, Filename) - Saves the created document to a file that can be opened in Adobe Acrobat.
AddImage( Page, Filename, X, Y, Width, Height) - Places a JPG or PNG image file onto the page at X,Y. The image is streched to fit the width and height parameters.
GetFont( Doc, FontName) - Gets one of the built-in PDF fonts for using in the document. You would need to get this to use as the font parameter in AddTextArea. Use the string of the name of one of the font constants below.
LoadJPEG( Doc, Filename) - Loads a JPEG image file and returns an image value that can be used in DrawImage.
LoadPNG( Doc, Filename) - Loads a PNG image file and returns an image value that can be used in DrawImage.
DrawImage( Page, Image, X, Y, Width, Height) - Draws the Image parameter onto the page. Image is stretched to fit width and height.
GetImageWidth( Image) - Returns width of a loaded image.
GetImageHeight( Image) - Returns height of a loaded image.
GetTextHeight( Font) - Returns the line height for this Font.
SetYOrigin( Value) - Value = 1 means the Y coordinate is 0 at the top of the page and increases as you go down. Value = 0 means Y coordinate 0 is at the bottom of the page and increases as you go up. Default value=1. The left side of the page is always X0.
GetCurrentTextX( Page) - Returns the X point of the end of the last text that was drawn on the page.
GetCurrentTextY( Page) - Returns the Y point of the end of the last text that was drawn on the page.
GetCurrentX( Page) - Returns the X point of the last graphic drawing position.
GetCurrentY( Page) - Returns the Y point of the last graphic drawing position.
SaveToBuff - Returns the data for the PDF file. This can be used to send the data out from an ASP web page and display it in the browser.
Free( Doc) - Call this after all done with creating PDF file.
SetFontAndSize( Page, Font, Size) - Not used because AddTextArea sets the font size.
AddHTMLArea( Page, Text, Y, ) - Set or Get the current line spacing distance. Returns ending Y position.
Understands a few simple HTML codes. Like:
<li>
<align="center">
<strong>
<h1>,<h2>,<h3>
<img height="285" width="343"  src="orgchart2.png" />

No settings for width, just draws the width of the page. Useful if you have some text data that is formatted with HTML codes. Uses Helvetica font.
Check should be 0. If Check=1 then will not draw, but only return the end Y position if it did draw.

AddCircle( Page,X,Y,R) - Draws a circle at X,Y and radius with current color.
SetLineColor( Page,Color) - Sets current line color to integer.
SetFillColor( Page,Color) - Sets current fill color to integer.
AddFilledCircle( Page,X,Y,R,Color) - Draws a circle at X,Y and radius. Color parameter is not used. Draws with current line color and current fill color.
CalcTextHeight( Page, Text, Left, Top, Width, Align, Font, Size, Length)  - Same as AddTextArea (without the height param) but doesn't draw anything. Returns the height of the text area that it would draw. A necessary function for finding out if a text area is going to be too big and run off the end of the page, so you can start a new page instead.

Properties:
TextLeading( Page) - Set or Get the current line spacing distance.
LeftMargin - Get or Set the width of the left margin. This amount is always added onto any drawing you do on the page.
TopMargin - Get or Set the width of the top margin. This moves Y0 down or up.
PageWidth( Page) - Set or Get the width of page.
PageHeight( Page) - Set or Get the height of page.
LineWidth( Page) - Set or Get the current drawing line width.
TextVerticalShift( Page, Value) - ?.
RightMargin - Set or Get the right margin value.
FilePath( String) - Only used in AddHTMLArea to add on to the front of src="/filename".
Doc, Page, Font:integer

Will be adding more features as the project progresses.

Built-In PDF Fonts. 
These fonts are built into Adobe Acrobat Reader and can be used in drawing without relying on outside fonts.
Font Names:
Courier 
Courier-Bold 
Courier-Oblique 
Courier-BoldOblique 
Helvetica 
Helvetica-Bold 
Helvetica-Oblique 
Helvetica-BoldOblique 
Times-Roman 
Times-Bold 
Times-Italic 
Times-BoldItalic 
Symbol 
ZapfDingbats


Alignments:
 Align_Left=0
Align_Right=1
Align_center=2
Align_Justify=3

