You can view the Component ProgID, Methods & Properties for this COM Object using the Microsoft OLE/COM Object Viewer:
BCL COM Objects can be accessed from a variety of programming environments. This brief example shows how to access a COM Object from Visual Basic.
Private WithEvents drakeObj As DRAKECOMLib.Drake
|
drakeObj.Convert(Trim(ifname), Trim(ofname), errMessage) |
BCL COM Objects can be accessed from a variety of programming environments. This brief example shows how to access a COM Object from Visual C++.
#include "COMClient.h" |
AfxOleInit(); |
private: m_pDrakeObj = IDrakePtr("DrakeCom.Drake.1"); |
int nResult = m_pDrakeObj->Convert(inFile, outFile, &errMsg); |
The COM ID for Drake 7.0 COM is "DrakeCom.Drake". To instantiate a Drake 7.0 COM object, do the following (VB sample):
Dim drakeObj As DRAKECOMLib.Drake Set drakeObj = CreateObject("DrakeCom.Drake") |
Drake 7.0 COM provides these 5 methods:
Note: strOptions is an XML document. Please refer to the Option String section
for details.
Note: The returned option string is a XML document. Please refer to the Option Option String for details.
Reminder: After you use SetOptionsXML to set the conversion settings, if you use GetOptionsXML to retrace them, you will only see the options that have been set to true. These options are also sorted.
For example:
<bool name="MergeParagraph" value="0"/> will not be shown; however,
<bool name="MergeParagraph" value="1"/> will be shown.
0 Successful
-1 Invalid input or output file names
-2 Conversion error. Please report this to bcl-supports.
-3 Eval version of Drake COM has expired.
-4 Invalid page range numbers.
-6 No open permission - User’s and/or owner’s password(s) required.
-7 No copy permission - Owner's password required.
-9999 Unable to load conversion library. Program installed incorrectly, please reinstall.
<?XML version="1.0" encoding="ISO-8859-1"?>
<conversion>
<product name="Drake"/>
<options>
<bool name="MergeParagraph" value="0"/>
<bool name="PreserveTextPosition" value="1"/>
<bool name="ShrinkFonts" value="0"/>
<bool name="AdjustFontNames" value="0"/>
<bool name="ExtractText" value="1"/>
<bool name="ExtractImages" value="1"/>
<bool name="UsingPageRange" value="1"/>
<numeric name="ImageFormat" value="0"/>
<numeric name="PageFrom" value="0"/>
<numeric name="PageTo" value="0"/>
<numeric name="PasswordLen" value="11"/>
<string name="Passwords" value="test,test2"/>
<numeric name="PasswordSeparator" value="44"/>
<numeric name="JpegQuality" value="75"/></options>
</conversion>
• Type – bool
• Possible values• 0: Do not detect
• 1: Detect header and footer
• Effect – Select this option to automatically detect the header and footer in a document. This option is only available when ConversionMethod is set to 1 (Preserve layout using spaces and tabs). This option will automatically be set to 1 (TRUE) when DocumentType is set to 3 (Pleading).
• Default – 1
• Type – bool
• Possible values – 0,1
• Effect – Select this option to extract hyperlinks
• Default – 1
• Type – numeric
• Possible values – 1-100
• Effect – Set the quality of JPEG images in the output, from 1 to 100%
• Default – 50%
• Type – bool
• Possible values – 0,1
• Effect – Select this option to merge individual words into lines of text. If this option is not selected, each word will be placed in a separate text box. This option is only available when ConversionMethod is set to 2 (Exact placement using textboxes).
• Default – 1
• Type – numeric
• Possible values – Non-negative number equal to the length of the Passwords string + 1. If PasswordLen is set to 0, Passwords is automatically set to NULL.
• Default – 0.
• Type – string
• Possible values – all valid characters.
• Effect – List of passwords for opening and/or setting security permissions of encrypted files (user and/or owner passwords). If you use multiple passwords, you must include a non-NULL character separating the passwords, and specify the separating character in PasswordSeparator.
• Default – NULL
• Type – numeric
• Possible values – any valid ASCII character exclude the null character ‘\0’.
• Effect – Character used to separate multiple passwords in the Passwords string.
• Default – 44 (‘,’ comma character).
www.bcltechnologies.com