Developer Tools
|
Office Productivity Applications
|
Enterprise Solutions
|
|||||||||||||||||||||||||||
Important
This product has been discontinued. Please check our old products page for more information.
Last month, you learned about using Gnostice Print2eDoc to convert documents from one format to another. This month, you will learn about using its SDK to programmatically control its conversion jobs.
Basically, Gnostice Print2eDoc SDK provides a COM interface to control Gnostice Print2eDoc settings. These settings are represented on the Print2eDoc GUI (graphical user interface) in the following dialogs:
From a programmer's point of view, the settings can be classified as:
Using these settings, it is even possible to totally do away with user input and completely control the process of creating documents based on the requirements of your program logic.
The main interface of Print2eDoc SDK is IgtPrint2eDoc.
The main properties of the IgtPrint2eDoc interface are listed below.
property OutputDocumentFormat: TxgtDocumentFormat; - specifies the output format type.property ShowSettingsDialog: WordBool; - controls the appearance of Advance Document Creation Properties dialog.property DefaultOutputDirectory: WideString; - accepts directory path where all the printed documents will be saved if the Save As dialog is not shown.
Otherwise Save As dialog is set to this folder by default.property ViewGeneratedDocuments: WordBool; - decides whether to open the output document after it is generated.property ShowPreview: WordBool; - decides whether Preview dialog needs to be shown.property ShowSaveDialog: WordBool; - specifies whether the Save As dialog is shown, where the user can choose the output format and the output document name.property OutputDocumentName: WideString; - specifies the name of the document that is created. This property will be effective only if UseCustomDocumentName property is true.property UseCustomDocumentName: WordBool; - decides whether to use the name specified by OutputDocumentName for the output file. If this property is set as false, the name of the output file will be constructed using the name of the original document and the application from which the print command was issued.property SourceApplication: TxgtSourceApplication; - specifies the application whose print output will be used as input for the conversion job.The following code snippet shows how to create an IgtPrint2eDoc object, specify its properties, and then fire its print command.
'Creates a IgtPrint2eDoc object Dim PrinterObj As New gtPrint2eDoc 'Specifies general settings PrinterObj.UseCustomDocumentName = True PrinterObj.DefaultOutputDirectory = _ "C:\Documents and Settings\avinash\My Documents" PrinterObj.OutputDocumentName = "Output" PrinterObj.OutputDocumentFormat = _ TxgtDocumentFormat.PDF PrinterObj.ShowPreview = True PrinterObj.ShowSaveDialog = False PrinterObj.ShowSettingsDialog = True PrinterObj.ViewGeneratedDocuments = True PrinterObj.SourceApplication = Other 'Prints the document PrinterObj.PrintDocument( _ "C:\Documents and Settings\avinash\My Documents\Sample.txt")
Next month, we will see how to use the SDK for specifying advanced document creation settings.
| Privacy | Legal | Feedback | Newsletter | © 2002-2010 Gnostice Information Technologies Private Limited. All rights reserved. |
This site is best viewed on a screen with minimum resolution of 1152 x 864 pixels. Windows users are advised to use Microsoft ClearType Tuning for optimal experience. Linux and other users can enable font smoothing, as supported by their OS. Also, please use the latest version of a standards-compliant browser such as Opera, FireFox, Chrome or Safari.