|
Steps for Microsoft Visual C++ 6
| 1. | Start Microsoft Visual C++ and create a new project. |
| 2. | To insert a component, there are two ways: |
| i) | On the Project menu, choose Add to Project, then choose Components and Controls. The Gallery dialog appears, select Registered ActiveX Controls folder from Gallery dialog. |
è Project Menu è Add to Project è Components and Controls è Registered ActiveX Controls

OR
| ii) | Secondary click (right click) on the user form. From the options list, select Insert ActiveX Control. |
| 3. | Select required "Gnostice eDocEngine" control from the list and click OK. |

| 4. | The Confirm Classes dialog appears, click OK to confirm the classes. |

| 5. | To enter the member variable, Ctrl+double click the selected component in the user form or on the View menu, choose ClassWizard, then select Member Variables tab from the popup dialog and click Add Variable. |

| 6. | In the Member Variable Name box, type a member variable. |
| 7. | Add gtDocEnums.h and gtDocUtils.h files from Include folder to the project. |
gtDocEnums.h – Consists of enumerations required by the engine.
gtDocUtils.h – Consists of helper functions required for specific conversation eg., In between Variants and Basic Data Types.
| 8. | You can start writing code. |
| 9. | The following sample code will create Hello World in the document: |
m_engine.SetFileName("test");//m_engine can be replaced with any of the engines eg., Bool IsActivated = m_engine.ActivateLicense("LicenseKey"); //not mandatory for trial users
m_engine.BeginDoc();
m_engine.TextOutXY(1,1,"Hello World");
m_engine.EndDoc();
The methods required to write a basic code is FileName, BeginDoc and EndDoc.
 | FileName is used to identify the file to be created. |
ActivateLicense is used activate the License for Gnostice eDocEngine ActiveX Control
 | BeginDoc is used to begin the document creation. |
 | EndDoc is used to end the document creation. |
You can add tables, Header, Footer and many properties in between BeginDoc and EndDoc which you can view it in your PDF format.
| 10. | By default, the Gnostice eDocEngine ActiveX/.NET pops up a setup dialog where you can set various properties of the output document. To control this option, use PrefShowSetupDialog property. If the PrefShowSetupDialog property is set to "True", then you are allowed to set the Preferences, Content, Background, Advanced, and Viewing Preferences OR the PrefShowSetupDialog can be controlled through the code as follows: |
m_PDFEngine.SetPrefShowSetupDialog(false);
 | Preference provides Page, Range and Embed Used True Type Fonts. |
 | Content provides Items to Render, Image and Document Information. |
 | Background provides Background Image and Background Color. |
 | Advanced provides Compress Document, Encrypt Document, User Permissions and Font Encoding. |
 | View Preference provides Page Layout, Page Mode, Hide UI Elements and Presentation Mode. |
| 11. | Click "OK", document is created in the required format. |
| 12. | Follow the same procedure for all the controls and code samples for the few controls are provided in the samples section. |

|