SlideShare a Scribd company logo
PDF CMD SDK




PDF CMD SDK




Version: PDF Server 9




  Zeon Corporation
       2008
http://www.pdfwizard.com
 http://www.zeon.com.tw




                           1
PDF CMD SDK



 Table of Content
  I.       System architecture......................................................................................9
  II.      Interface Hierarchy .....................................................................................10
  I.       Convert other document formats to PDF ....................................................13
  II.      Control conversion settings ........................................................................14
  III.     Combine multiple PDF documents into one PDF file..................................15
  IV.      Set security option ......................................................................................16
  V.       Error handling .............................................................................................17
  I.       PDFCreate..................................................................................................19
      i.         IPDFCreate ..................................................................................20
           1.         Initialize................................................................................21
           2.         Uninitialize ...........................................................................22
           3.         IsFileTypeSupported............................................................23
           4.         Convert ................................................................................24
           5.         StopCreating........................................................................25
           6.         RestoreDefaultSettings........................................................26
           7.         SetTimeOut .........................................................................27
           8.         SetExcelSheetRange...........................................................28
           9.         ConvertWithIni .....................................................................29
           10.        GetGeneralSettingInterface .................................................31
           11.        GetCompressionSettingInterface.........................................32
           12.        GetFontEmbedSettingInterface ...........................................33
           13.        GetWordMacroSettingInterface ...........................................34
           14.        GetVolumeLimit ...................................................................35
           15.        GetVolumeLeft.....................................................................36
      ii.        _IPDFCreateEvents .....................................................................37
           1.         StartDoc...............................................................................38
           2.         StartPage.............................................................................39
           3.         EndPage..............................................................................40
           4.         EndDoc................................................................................41
           5.         Abort ....................................................................................42
      iii.       IPDFGeneralSetting .....................................................................43
           1.         UseCustomPageSize...........................................................44
           2.         StandardPageSize...............................................................45
           3.         Unit ......................................................................................46
           4.         Margin..................................................................................47
           5.         Width ...................................................................................48
           6.         Height ..................................................................................49
           7.         Orientation ...........................................................................50
           8.         Resolution............................................................................51
           9.         ZoomScale ..........................................................................52
           10.        Compatible ..........................................................................53
           11.        ViewPDF..............................................................................54
           12.        OptimizePDF .......................................................................55


                                                                                                                 2
PDF CMD SDK


   iv.     IPDFCompressionSetting.............................................................56
       1.      AutoCompression ................................................................57
       2.      AutoCompressionRate.........................................................58
       3.      CompressColor....................................................................59
       4.      ColorCompressMethod........................................................60
       5.      ReSampleColor ...................................................................61
       6.      ColorReSampleMethod .......................................................62
       7.      ColorReSampleResolution ..................................................63
       8.      CompressGray ....................................................................64
       9.      GrayCompressMethod.........................................................65
       10.     ReSampleGray ....................................................................66
       11.     GrayReSampleMethod ........................................................67
       12.     GrayReSampleResolution ...................................................68
       13.     CompressMono ...................................................................69
       14.     MonoCompressMethod .......................................................70
       15.     ReSampleMono...................................................................71
       16.     MonoReSampleMethod .......................................................72
       17.     MonoReSampleResolution ..................................................73
   v.      IPDFFontEmbedSetting ...............................................................74
       1.      EmbedAllFonts ....................................................................75
       2.      SubsetFont ..........................................................................76
       3.      SubsetThreshold .................................................................77
       4.      EnableAlwaysEmbed...........................................................78
       5.      AlwaysEmbedCount ............................................................79
       6.      AlwaysEmbedFontName .....................................................80
       7.      EnableNeverEmbed.............................................................81
       8.      NeverEmbedCount ..............................................................82
       9.      NeverEmbedFontName .......................................................83
   vi.     IWordMacroSetting ......................................................................84
       1.      AutoBookmark .....................................................................85
       2.      DoNote ................................................................................86
       3.      DoInternetLink .....................................................................87
       4.      DoCrossDocuLink................................................................88
       5.      DoCrossRefLink ..................................................................89
       6.      ConvertTextBox...................................................................90
       7.      AutoComment......................................................................91
II. PDFCmd.....................................................................................................92
   i.      IPDFCmd .....................................................................................93
       1.      Initialize................................................................................94
       2.      Uninitialize ...........................................................................95
       3.      CreateFileEditInterface ........................................................96
       4.      CreateCombineInterface......................................................97
       5.      CreatePackageInterface ......................................................98
       6.      Compatible ..........................................................................99
   ii.     IPDFFileEdit ...............................................................................100
       1.      Open..................................................................................101



                                                                                                          3
PDF CMD SDK


       2.        NewPDF ............................................................................102
       3.        Save ..................................................................................103
       4.        Close .................................................................................104
       5.        GetPageNum.....................................................................105
       6.        CreatePageEditInterface ...................................................106
       7.        AddPDFMark .....................................................................107
       8.        CreateTextWatermark .......................................................108
       9.        CreateImageWatermark ....................................................109
       10.       GetDocInfoInterface...........................................................110
       11.       GetSecurityInterface ..........................................................111
       12.       GetOpenOptionInterface....................................................112
iii.         IPDFDocInfoSetting ...................................................................113
       1.        Title....................................................................................114
       2.        Subject...............................................................................115
       3.        Keyword.............................................................................116
       4.        Author ................................................................................117
       5.        GetCustomDocInfoCount...................................................118
       6.        GetCustomDocInfo ............................................................119
       7.        AddCustomDocInfo............................................................120
       8.        DeleteCustomDocInfo........................................................121
       9.        Creator...............................................................................122
       10.       Producer ............................................................................123
       11.       LoadDocInfoSettingFromIni ...............................................124
iv.          IPDFSecuritySetting...................................................................125
       1.        open_password .................................................................126
       2.        owner_password ...............................................................127
       3.        canPrint .............................................................................128
       4.        canAnnotate ......................................................................129
       5.        canCopy ............................................................................130
       6.        canModify ..........................................................................131
       7.        canContentCopyAndExtraction..........................................132
       8.        canContentAccessForVisuallyImpaired .............................133
       9.        encryptionLevel .................................................................134
       10.       changesAllowed ................................................................135
       11.       printingAllowed ..................................................................136
       12.       SetSecurity ........................................................................137
       13.       RemoveSecurity ................................................................138
       14.       LoadSecuritySettingFromIni ..............................................139
       15.       RemoveSecurityWithPassword .........................................140
v.           IPDFOpenOptionSetting ............................................................141
       1.        Magnification .....................................................................142
       2.        InitialPage..........................................................................143
       3.        Layout................................................................................144
       4.        InitialWindow .....................................................................145
       5.        NavigationPane .................................................................146
       6.        HideToolbar .......................................................................147



                                                                                                           4
PDF CMD SDK


      7.        HideMenubar .....................................................................148
      8.        HideControl........................................................................149
      9.        ShowDocumentTitle...........................................................150
      10.       LoadOpenSettingFromIni...................................................151
vi.         IPDFPageEdit ............................................................................152
    1.          CreateNewPage ................................................................153
    2.          Open..................................................................................154
    3.          GetPageWidthHeight .........................................................155
    4.          Delete ................................................................................156
    5.          Rotate ................................................................................157
    6.          Crop...................................................................................158
    7.          Insert..................................................................................159
    8.          Close .................................................................................160
    9.          GetPageBitmap .................................................................161
vii.        IPDFWatermarkInfo ...................................................................162
    1.          Anchor ...............................................................................163
    2.          Unit ....................................................................................164
    3.          XOffset...............................................................................165
    4.          YOffset...............................................................................166
    5.          CrossPageWatermark .......................................................167
    6.          Binding...............................................................................168
    7.          Clearence ..........................................................................169
    8.          Position..............................................................................170
    9.          Duplex ...............................................................................171
    10.         Angle .................................................................................172
    11.         Opacity ..............................................................................173
    12.         Background .......................................................................174
    13.         ShowOnScreen .................................................................175
    14.         ShowOnPrint .....................................................................176
    15.         PageRange........................................................................177
    16.         EvenOdd............................................................................178
    17.         AddWatermark...................................................................179
    18.         Redo ..................................................................................180
    19.         Undo ..................................................................................181
viii.       IPDFTextWatermark ..................................................................182
    1.          Text....................................................................................183
    2.          TextFont ............................................................................184
    3.          TextSize.............................................................................185
    4.          TextStyle............................................................................186
    5.          TextColorRed ....................................................................187
    6.          TextColorGreen .................................................................188
    7.          TextColorBlue....................................................................189
    8.          OutlineOnly........................................................................190
    9.          LoadSettingFromIni ...........................................................191
ix.         IPDFImageWatermark ...............................................................192
    1.          filename .............................................................................193



                                                                                                          5
PDF CMD SDK


      2.       Width .................................................................................194
      3.       Height ................................................................................195
      4.       KeepRatio..........................................................................196
      5.       CoverWholePage ..............................................................197
      6.       PageIdentifier ....................................................................198
      7.       MarkedAreaOnly................................................................199
      8.       LoadSettingFromIni ...........................................................200
    x.     IPDFCombine.............................................................................201
        1.     AddFile ..............................................................................202
        2.     Concate .............................................................................203
        3.     Overlay ..............................................................................204
        4.     IsCombining.......................................................................205
        5.     StopCombining ..................................................................206
        6.     MergeOrder .......................................................................207
        7.     Anchor ...............................................................................208
        8.     MergeRepeat.....................................................................209
    xi.    _IPDFCombineEvents................................................................210
        1.     StartJob .............................................................................211
        2.     StartDoc.............................................................................212
        3.     EndDoc..............................................................................213
        4.     EndJob ..............................................................................214
        5.     Abort ..................................................................................215
        6.     QueryContinue ..................................................................216
    xii.   _IPDFQueryPasswordEvents ....................................................217
        1.     QueryPassword .................................................................218
        2.     PasswordIncorrect .............................................................219
    xiii.  IPDFPackage .............................................................................220
        1.     AddField ............................................................................221
        2.     SetFieldValue ....................................................................222
        3.     SetSortField.......................................................................223
        4.     SetCover............................................................................224
        5.     Pack...................................................................................225
        6.     AddFile ..............................................................................226
        7.     ClearFields ........................................................................227
        8.     ClearFiles ..........................................................................228
III. PDFLibrarian ............................................................................................229
    i.     IPDFLibrarian .............................................................................230
        1.     Initialize..............................................................................231
        2.     Uninitialize .........................................................................232
        3.     CreateIndexInterface .........................................................233
        4.     CreateSearchInterface.......................................................234
    ii.    IPDFIndex ..................................................................................235
        1.     indexTitle ...........................................................................236
        2.     indexDescription ................................................................237
        3.     wordFinderVersion.............................................................238
        4.     AddIncludeFile...................................................................239



                                                                                                          6
PDF CMD SDK


      5.       AddExcludeFile..................................................................240
      6.       AddStopWord ....................................................................241
      7.       AddCustomField ................................................................242
      8.       GetIncludeFileArray...........................................................243
      9.       GetExcludeFileArray..........................................................244
      10.      GetStopWordsArray...........................................................245
      11.      GetCustomFieldArray ........................................................246
      12.      LoadIndex..........................................................................247
      13.      BuildIndex..........................................................................248
      14.      RebuildIndex......................................................................249
      15.      PurgeIndex ........................................................................250
      16.      IsBuilding ...........................................................................251
      17.      AbortBuilding .....................................................................252
      18.      GetCatalogStatus ..............................................................253
  iii.     IPDFSearch ...............................................................................255
       1.      SetOption...........................................................................256
       2.      AddCriteria.........................................................................257
       3.      SearchIndex ......................................................................259
       4.      AbortSearching..................................................................260
  iv.      _IPDFSearchEvents...................................................................261
       1.      FindWordInDoc..................................................................262
       2.      FindWordInBookmark ........................................................263
       3.      FindWordInComment.........................................................264
       4.      StartSearch........................................................................265
IV. PDF2Image ..............................................................................................266
  i.       IPDF2Image ...............................................................................267
       1.      Initialize..............................................................................268
       2.      Uninitialize .........................................................................269
       3.      OpenFile ............................................................................270
       4.      CloseFile............................................................................271
       5.      GetPageCount...................................................................272
       6.      SetScale ............................................................................273
       7.      SetSize ..............................................................................274
       8.      PrintToBMP .......................................................................275
       9.      PrintToJPEG......................................................................276
       10.     PrintToJPEG2000..............................................................277
       11.     PrintToTIFF .......................................................................278
       12.     PrintToMultiTIFF................................................................280
       13.     PrintToGIF .........................................................................281
       14.     PrintToHBitmap .................................................................282
       15.     removeMargin....................................................................283
       16.     rotation...............................................................................284
       17.     content...............................................................................285
  ii.      _IPDF2ImageEvents ..................................................................286
       1.      QueryPassword .................................................................287
       2.      PasswordIncorrect .............................................................288



                                                                                                        7
PDF CMD SDK



 Overview

PDF CMD is a set of component objects providing COM interfaces to
     convert — from other document formats to PDF;
     modify — edit document properties, manipulate pages;
     secure — set security option;
     combine — concatenate or overlay;
     annotate — add watermark;
     search — index and search
PDF documents.

All the DocuCom series products including the PDF Gold, PDF Driver, Watch
Folder and PDF Server Console/Client are based on the same underlayer
application programming interfaces of PDF CMD. See system architecture for
detail.




                                                                             8
PDF CMD SDK



I. System architecture
                            Diagram of system architecture

                     PDF Gold        PDF Driver      Watchfolder        PDFReader OCX
   Applications
                     PDF Server Console / Client        PDF CMD          ...




                     File      Image2PDF          Create       Doc      Mark         Index

     PDF API
 Abstraction Layer   Tag          Package    Digital Signature         Security           Stamp


                     Imposition       Watermark         XFDF         Combine        ...




  DocuCom PDF
                      DAB            DD           DDE          DDS             DU           ...
   Core Library



On the ground, there is Zeon’s elite DocuCom PDF Core Library. Provides
complete PDF specifications support via industry standard interface syntax.

Then there is a middle PDF API abstraction layer. By offering application friendly
format APIs, the middle layer greatly simplifies the task of PDF document
processing.

And finally we have the application layer, including PDF CMD of course.
Essentially, PDF CMD is the COM interface wapper of the underlay PDF API.




                                                                                                  9
PDF CMD SDK



II. Interface Hierarchy




                                        10
PDF CMD SDK


                                    IPDFGeneralSetting

                                    IPDFCompressionSetting
                IPDFCreate
                                    IPDFCompressionSetting
PDFCreate
                                    IPDFWordMacroSetting

                _IPDFCreateEvents

                                                     IPDFDocInfoSetting

                                                     IPDFSecuritySetting

                                                     IPDFOpenOptionSetting
                               IPDFFileEdit
                                                     IPDFPageEdit
               IPDFCmd
                                                     IPDFTextWatermark


PDFCmd                                               IPDFImageWatermark

                                  IPDFCombine

                               IPDFPackage


               _IPDFCombineEvents

               _IPDFQueryPasswordEvents


                                        IPDFIndex
                  IPDFLibrarian
PDFLibrarian                            IPDFSearch

                  _IPDFSearchEvents


                  IPDF2Image
PDF2Image
                  _IPDF2ImageEvents


                                                                             11
PDF CMD SDK



 Programming Guide
Since PDF CMD provides standard COM interfaces, it should be compatible to
any programming languages that support COM, including scripting languages.

Though PDF CMD COM interfaces are language independent, we use C++
syntax for instructions and descriptions in this document.

A typical usage of PDF CMD includes following procedure:
       1. Initialize COM;
       2. Create instances of COM classes and initialize;
       3. Retrieve interfaces and do your work;
       4. Uninitialize and clean up.




                                                                             12
PDF CMD SDK



I. Convert other document formats to PDF
The most common usage of PDF CMD is to create PDF from other document
formats.

Basically, it is done by utilizing Convert method of IPDFCreate interface.
1. Create IPDFCreate interface, which is the default sink interface of PDFCreate
component object;
2. Call Initialize method to initialize PDFCreate component object;
3. Use Convert method to create PDF from source file;
4. Call Uninitialize method and release the IPDFCreate interface.




                                                                              13
PDF CMD SDK



II. Control conversion settings
Various settings during conversion can be configed, through IPDFGeneralSetting,
IPDFCompressionSetting,and IPDFFontEmbedSetting.

To modify conversion settings:
1. Create IPDFCreate interface, which is the default sink interface of PDFCreate
component object;
2. Call Initialize method to initialize PDFCreate component object;
3. Use GetGeneralSettingInterface, GetCompressionSettingInterface, or
GetFontEmbedSettingInterface to retrieve corresponding interfaces;
4. Modify conversion settings using the returned interfaces;
5. Do conversion jobs;
6. Call Uninitialize method and release the IPDFCreate interface.




                                                                              14
PDF CMD SDK



III.Combine multiple PDF documents into one PDF file
IPDFCombine interface is used to concatenate or overlay multiple PDF
documents into one PDF file.

1. Create IPDFCmd interface, which is the defatult sink interface of PDFCmd
component object;
2. Call Initialize method to initialize PDFCmd component object;
3. Use CreateCombineInterface method to create IPDFCombine interface;
4. Include files you want to combine through AddFile method;
5. Call Concate or Overlay to do the job;
6. Release the created IPDFCombine interface;
7. Uninitialize and release the IPDFCmd interface.




                                                                              15
PDF CMD SDK



IV.   Set security option
Security options are control through IPDFSecuritySetting interface. Basic
procedure includes create IPDFEditEdit interface, open target PDF file,and
retrieve IPDFSecuritySetting interface.

1. Create IPDFCmd interface, which is the defatult sink interface of PDFCmd
component object;
2. Call Initialize method to initialize PDFCmd component object;
3. Use CreateFileEditInterface method to create IPDFFileEdit interface;
4. Use Open method to open the target PDF file;
5. Retrieve IPDFSecuritySetting interface through GetSecurityInterface method.
6. Utilize methods of IPDFSecuritySetting interface to set passwords and various
permissions;
7. Do call SetSecurity method to apply the previous configurations;
8. Release the created IPDFFileEdit interface;
9. Uninitialize and release the IPDFCmd interface.




                                                                              16
PDF CMD SDK



V. Error handling
Error information in PDF CMD is maintained through standard component
automation error handling ways. Once a return value indicates an error occurred,
application could use GetErrorInfo API to retrieve the associated IErrorInfo object
which contains detailed information of the last error.

For error handling other than C++ environment, please refer to manual of the
specific programming language.




                                                                                17
PDF CMD SDK



 Reference

PDF CMD includes following component objects:

      PDFCreate

      PDFCmd

      PDFLibrarian

      PDF2Image




                                                18
PDF CMD SDK



I. PDFCreate
PDFCreate; the most important and complex component object in PDF CMD,
can convert any printable document format to PDF by “PRINTING” to the virtual
printer “DocuCom PDF Driver”.

Various conversion settings are presented including: page setup, image
compression, font embedding, etc.

An event handler interface _IPDFCreateEvents is defined for applications to
receive events during conversion.

An additional interface IWordMacroSetting controls further conversion options for
Microsoft Office Word.

Though multi-thread support is build in PDFCreate for converting multiple
documents at the same time, multi-threaded printing compatible applications are
a must in order to succeed in such cases. Some ubiquitious applications are
known to have issues during multi-threaded printing, such as Microsoft Word,
Micrsoft Excel and Microsoft PowerPoint. Single-thread restriction is applied for
those application in PDFCreate.

Note that since the conversion is actually a printing process, the application
natively supporting the original document format has to be installed on the host
operating system. Ex. to convert “.doc” files, Microsoft Office Word or any other
applications that support printing of “.doc” file must exist.




                                                                                19
PDF CMD SDK



i. IPDFCreate

IPDFCreate is the default sink interface of PDFCreat component object, and
provides methods for initializing of PDFCreate component object and file
conversion. Conversion setting interfaces incudeing IPDFGeneralSetting,
IPDFComressionSetting, IPDFFontEmbedSetting and IWordMacroSetting can
also be retrieved from this interface.




                                                                             20
PDF CMD SDK


IPDFCreate Interface

1. Initialize


      Description
            Initialize the PDFCreate component object.

      Syntax
            HRESULT Initialize ( BSTR sn, long reserved );

      Parameters
           sn
           [in] Serial number.
           reserved
           [in] Reserved for Zeon Corporation. Must be set to 0.

      Return Values
            S_OK
            The method succeeded.
            Others
            Fail to initialize. Return error information through IErrorInfo
            Interface.

      Remarks
           PDFCreate must be initialized before invoking its method.




                                                                              21
PDF CMD SDK


IPDFCreate Interface

2. Uninitialize


      Description
            Close the PDFCreate component.

      Syntax
            HRESULT Uninitialize ( );

      Parameters
           None

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           This method must be called before terminating the application.




                                                                             22
PDF CMD SDK


IPDFCreate Interface

3. IsFileTypeSupported


     Description
           Whether specific file type is supported.

     Syntax
           HRESULT IsFileTypeSupported ( BSTR sfileext, VARIANT_BOOL
           *pbIsFileTypeSupproted );

     Parameters
          sfileext
          [in] File extension, such as “.doc”. “.” is a must.
          pbIsFileTypeSupproted
          [out, retval] Whether the specific file type is supported.
                  TRUE = Supported.
                  FALSE = Unsupported.


     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Caution: “.pdf” file is not supported.




                                                                            23
PDF CMD SDK


IPDFCreate Interface

4. Convert


     Description
           Convert other format files to PDF

     Syntax
           HRESULT Convert ( BSTR sSourceFile, BSTR sDestFile );

     Parameters
          sSourceFile
          [in] Full path of the source file you want to convert to PDF.
          sDestFile
          [in] Destination path to save the resulting PDF file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Four events are fired during converting: StartDoc, StartPage,
          EndPage, and EndDoc.




                                                                            24
PDF CMD SDK


IPDFCreate Interface

5. StopCreating


     Description
           Used to stop conversion in process.

     Syntax
           HRESULT StopCreating ( long lJobID );

     Parameters
          lJobID
          [in] Job ID returned by StartDoc.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            25
PDF CMD SDK


IPDFCreate Interface

6. RestoreDefaultSettings


     Description
           Restore the default settings of PDFCreate.

     Syntax
           HRESULT RestoreDefaultSettings ( long reserved );

     Parameters
          reserved
          [in] Reserved for Zeon Corporation.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Related setting is available through IPDFGeneralSetting,
          IPDFCompressionSetting, and IPDFFondEmbedSetting interfaces.




                                                                            26
PDF CMD SDK


IPDFCreate Interface

7. SetTimeOut


     Description
           Set time out value for a single convert job.

     Syntax
           HRESULT SetTimeOut ( long lMillisecond );

     Parameters
           lMillisecond
           [in] Maximum time interval for a single convert job.
     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            27
PDF CMD SDK


IPDFCreate Interface

8. SetExcelSheetRange


     Description
           Set the range of the Excel Sheet you want to convert.

     Syntax
           HRESULT SetExcelSheetRange ( BSTR sRange );

     Parameters
           sRange
           [in] Specifies the zero based range number of the Excel sheet to
           convert ,Empty to convert all sheets.
     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                          28
PDF CMD SDK


IPDFCreate Interface
9. ConvertWithIni


     Description
           Convert other format files to PDF according to ini setting.

     Syntax
           HRESULT ConvertWithIni (
            BSTR sSourceFile,
            BSTR sDestFile,
            BSTR sGeneralIniFilePath,
            BSTR sDestinationIniFilePath,
            BSTR sCompressionIniFilePath,
            BSTR sFontIniFilePath,
            BSTR sDocumentIniFilePath,
            BSTR sSecurityIniFilePath,
            BSTR sWatermarkIniFilePath );

     Parameters
          sSourceFile
          [in] Full path of the source file you want to convert to PDF.
          sDestFile
          [in] Destination path to save the resulting PDF file.
          sGeneralIniFilePath
          [in] General ini setting file path.
          sDestinationIniFilePath
          [in] Destination ini setting file path.
          sCompressionIniFilePath
          [in] Compression ini setting file path.
          sFontIniFilePath
          [in] Font ini setting file path.
          sDocumentIniFilePath
          [in] Document ini setting file path.
          sSecurityIniFilePath
          [in] Security ini setting file path.
          sWatermarkIniFilePath
          [in] Watermark ini setting file path.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorinfo Interface.



                                                                            29
PDF CMD SDK


Remarks
     Four events are fired during converting: StartDoc, StartPage,
     EndPage, and EndDoc.




                                                                     30
PDF CMD SDK


IPDFCreate Interface

10.   GetGeneralSettingInterface


      Description
            Get general setting interface.

      Syntax
            HRESULT GetGeneralSettingInterface ( LPDISPATCH * lppDisp );

      Parameters
            lppDisp
            [out, retval] Return General Setting Interface.
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             31
PDF CMD SDK


IPDFCreate Interface

11.   GetCompressionSettingInterface


      Description
            Get compression setting interface.

      Syntax
            HRESULT GetCompressionSettingInterface ( LPDISPATCH *
            lppDisp );

      Parameters
            lppDisp
            [out, retval] Return Compression Setting Interface.
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             32
PDF CMD SDK


IPDFCreate Interface

12.   GetFontEmbedSettingInterface


      Description
            Get font embed setting interface.

      Syntax
            HRESULT GetFontEmbedSettingInterface ( LPDISPATCH *
            lppDisp );

      Parameters
            lppDisp
            [out, retval] Return font embed setting interface.
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             33
PDF CMD SDK


IPDFCreate Interface

13.   GetWordMacroSettingInterface


      Description
            Get Word Macro setting interface.

      Syntax
            HRESULT GetWordMacroSettingInterface ( LPDISPATCH *
            lppDisp );

      Parameters
            lppDisp
            [out, retval] Return Word Macro setting interface.
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             34
PDF CMD SDK


IPDFCreate Interface

14.   GetVolumeLimit


      Description
            Get volume limit value.

      Syntax
            HRESULT GetVolumeLimit ( long * pPages, long * pFiles );

      Parameters
           pPages
           [out, retval]   Return volume limited pages number.
           pFiles
           [out, retval]   Return volume limited files number.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             35
PDF CMD SDK


IPDFCreate Interface

15.   GetVolumeLeft


      Description
            Get volume left value.

      Syntax
            HRESULT GetVolumeLeft ( long * pPages, long * pFiles );

      Parameters
           pPages
           [out, retval]   Return volume left pages number.
           pFiles
           [out, retval]   Return volume left files number.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             36
PDF CMD SDK



ii. _IPDFCreateEvents

Through _IPDFCreateEvents interface, application can receive events dring file
conversion.




                                                                             37
PDF CMD SDK


_IPDFCreateEvents Interface

1. StartDoc


     Description
           Inform the application that file conversion starts.

     Syntax
           void StartDoc ( long lJobID, BSTR sFileName );

     Parameters
          SFileName
          [in] Full path of resulting PDF file.
          lJobID
          [in] A number used to identify the file being processed.


     Return Values
           None

     Remarks
          None




                                                                     38
PDF CMD SDK


_IPDFCreateEvents Interface

2. StartPage


     Description
           Inform the application that the specific page starts to be converted.

     Syntax
           void StartPage (long JobID, long iPageNo );

     Parameters
          iPageNo
          [in] Specifies which page is being processed.
          lJobID
          [in] A number used to identify the file being processed.

     Return Values
           None

     Remarks
          None




                                                                              39
PDF CMD SDK


_IPDFCreateEvents Interface

3. EndPage


    Description
          Inform the application that the specific page has been converted.

    Syntax
          void EndPage (long JobID );

    Parameters
         lJobID
         [in] A number used to identify the file being processed.


    Return Values
          None

    Remarks
         Corresponding page number has been obtained by previous
         StartPage.




                                                                              40
PDF CMD SDK


_IPDFCreateEvents Interface

4. EndDoc


    Description
          Inform the application, that the conversion has been finished.

    Syntax
          void EndDoc ( long JobID );

    Parameters
         lJobID
         [in] A number used to identify the file being processed.


    Return Values
          None

    Remarks
         Corresponding file path has been obtained by previous StartDoc.




                                                                           41
PDF CMD SDK


_IPDFCreateEvents Interface

5. Abort


     Description
           Inform the application that conversion process has been terminated.

     Syntax
           void Abort ( long JobID );

     Parameters
          lJobID
          [in] A number used to identify the file being processed.

     Return Values
           None

     Remarks
          When conversion process is terminated, COM will send this event,
          except that the process is cancel by the application through
          StopCreating.




                                                                          42
PDF CMD SDK



iii. IPDFGeneralSetting

This interface provides methods to get or set general property related to file
conversion. IPDFGeneralSetting interface should be retrieved through
GetGeneralSettingInterface method.




                                                                                 43
PDF CMD SDK


IPDFGeneralSetting Interface

1. UseCustomPageSize


    Description
          UseCustomPageSize proterty.constrols whether to use the
          customized page size.

    Syntax
          HRESULT get_UseCustomPageSize ( VARIANT_BOOL
          *pbUseCustomPageSize );

           HRESULT put_UseCustomPageSize ( VARIANT_BOOL
           bUseCustomPageSize );

    Parameters
         pbUseCustomPageSize [out, retval]
         bUseCustomPageSize         [in]
         A boolean variable specifies whether to use the customized page
         size
               TRUE = Use customized page size.
               FALSE = Do not use customized page size.
         Default is FALSE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           44
PDF CMD SDK


IPDFGeneralSetting Interface

2. StandardPageSize


     Description
           StandardPageSize property controls the standard page size in use.

     Syntax
           HRESULT get_StandardPageSize ( StandardPageSizeEnum
           *peStandardPageSize );

            HRESULT put_StandardPageSize ( StandardPageSizeEnum
            eStandardPageSize );

     Parameters
          peStandardPageSize         [out, retval]
          eStandardPageSize          [in]
          A StandardPageSizeEnum variable specifiess which predefined
          standard page size is in use. Default is SP_A4.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of StandardPageSizeEnum:
          enum {
                  SP_Letter         = 0,
                  SP_Legal          = 1,
                  SP_Tabloid        = 2,
                  SP_A4             = 3,
                  SP_A3             = 4,
                  SP_Executive      = 5,
                  SP_B4             = 6,
                  SP_B5             = 7,
                  SP_Screen         =8
          } StandardPageSizeEnum ;




                                                                            45
PDF CMD SDK


IPDFGeneralSetting Interface

3. Unit


     Description
           Unit property controls the unit used.

     Syntax
           HRESULT get_Unit ( UnitEnum *peUnit );

            HRESULT put_Unit ( UnitEnum eUnit );

     Parameters
          peUnit        [out, retval]
          eUnit         [in]
          A UnitEnum variable specifiess which predefined unit is in use.
          Default is Unit_Inches.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of UnitEnum:
          enum {
                  Unit_Inches = 0,
                  Unit_MM = 1,
                  Unit_Points =.2
          } UnitEnum ;




                                                                            46
PDF CMD SDK


IPDFGeneralSetting Interface

4. Margin


     Description
           Margin property controls the paper margin in use.

     Syntax
           HRESULT get_Margin ( double * pdMargin );

            HRESULT put_Margin ( double dMargin );

     Parameters
          pdMargin     [out, retval]
          dMargin      [in]
          A double variable specifies the paper margin in given unit. Default
          is 0.25.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            47
PDF CMD SDK


IPDFGeneralSetting Interface

5. Width


     Description
           Width property controls the paper width in use.

     Syntax
           HRESULT get_Width ( double *pdWidth );

            HRESULT put_Width ( double dWidth );

     Parameters
          pdWidth      [out, retval]
          dWidth       [in]
          A double variable specifies the paper width in given unit. Default is
          200.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                             48
PDF CMD SDK


IPDFGeneralSetting Interface

6. Height


     Description
           Height property controls the paper height in use.

     Syntax
           HRESULT get_Height ( double *pdHeight );

            HRESULT put_Height ( double dHeight );

     Parameters
          pdHeight     [out, retval]
          dHeight      [in]
          A double variable specifies the paper height in use. Dafault is 200.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                             49
PDF CMD SDK


IPDFGeneralSetting Interface

7. Orientation


     Description
           Orientation property controls the paper orientation in use, portrait or
           landscape.

     Syntax
           HRESULT get_Orientation ( OrientationEnum *peOrientation );

            HRESULT put_Orientation ( OrientationEnum eOrientation );

     Parameters
          peOrientation          [out, retval]

            A OrientationEnum variable specifies which predefined orientation
            is in use. Default is Orien_Portrait.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of OrientationEnum:
          enum {
                  Orient_Portrait = 1,
                  Orient_Landscape = 2
          } OrientationEnum ;




                                                                               50
PDF CMD SDK


IPDFGeneralSetting Interface

8. Resolution


     Description
           Resolution property controls the printer resolution in use.

     Syntax
           HRESULT get_Resolution ( ResolutionEnum *peResolution );

            HRESULT put_Resolution ( ResolutionEnum eResolution );

     Parameters
          peResolution          [out, retval]
          eResolution           [in]
          A ResolutionEnum variable specifies which predefined printer
          resolution is in use. Default is Resolution_600.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of ResolutionEnum
          enum {
                  Resolution_72 = 0,
                  Resolution_150 = 1,
                  Resolution_300 = 2,
                  Resolution_600 = 3,
                  Resolution_1200 = 4,
                  Resolution_2400 = 5
          } ResolutionEnum ;




                                                                            51
PDF CMD SDK


IPDFGeneralSetting Interface

9. ZoomScale


    Description
          Scale property controls the scale factor to be applied to pages.

    Syntax
          HRESULT get_ZoomScale ( long *plScale );

           HRESULT put_ZoomScale ( long lScale );

    Parameters
         plScale       [out, retval]
         lScale        [in]
         A long variable specifies the scale factor in use. Default is 100

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                             52
PDF CMD SDK


IPDFGeneralSetting Interface

10.   Compatible


      Description
            Compatible controls the PDF specification version to be compatible
            of the resulting PDF file.

      Syntax
            HRESULT get_Compatible ( CompatibleEnum *peCompatible );

             HRESULT put_Compatible ( CompatibleEnum eCompatible );

      Parameters
           peCompatible         [out, retval]
           eCompatible          [in]
           A CompatibleEnum variable specifies the PDF specification to be
           compatible. Default is Compatible_PDF14.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Definition of CompatibleEnum:
           enum {
                   Compatible_PDF13 = 0,
                   Compatible_PDF14 = 1,
                   Compatible_PDF15 = 2,
                   Compatible_PDF16 = 3,
                   Compatible_PDF17 = 4,
                   Compatible_PDFA = -1
           } CompatibleEnum ;




                                                                             53
PDF CMD SDK


IPDFGeneralSetting Interface

11.   ViewPDF


      Description
            ViewPDF property controls whether to view the resulting PDF file
            after conversion.

      Syntax
            HRESULT get_ViewPDF ( VARIANT_BOOL *pbViewPDF );

             HRESULT put_ViewPDF ( VARIANT_BOOL bViewPDF );

      Parameters
           pbViewPDF [out, retval]
           bViewPDF [in]
           A boolean variable specifies whether to view the resulting PDF file.
                 TRUE = View the resulting PDF file.
                 FALSE = Do not view the resulting PDF file.
           Default is FALSE.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None.




                                                                               54
PDF CMD SDK


IPDFGeneralSetting Interface

12.   OptimizePDF


      Description
            OptimizePDF property controls whether to optimize the resulting
            PDF file

      Syntax
            HRESULT get_OptimizePDF ( VARIANT_BOOL *pbOptimizePDF );

             HRESULT put_OptimizePDF ( VARIANT bOptimizePDF );

      Parameters
           pbOptimizePDF       [out, retval]
           bOptimizePDF        [in]
           A boolean variable specifies whether to optimize the resulting PDF
           file.
                 TURE = Optimize the resulting PDF file.
                 FALSE = Do not optimize the resulting PDF file.
           Default is TRUE.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                              55
PDF CMD SDK



iv. IPDFCompressionSetting

This interface provides methods to get or set properties related to compression
settings while converting files. IPDFCompressionSetting interface should be
retrieved through GetCompressionSettinginterface method.




                                                                                  56
PDF CMD SDK


IPDFCompressionSetting Interface

1. AutoCompression


    Description
          AutoCompression property controls whether to use auto
          compression while converting files.

    Syntax
          HRESULT get_AutoCompression ( VARIANT_BOOL
          *pbAutoCompression );

           HRESULT put_AutoCompression ( VARIANT_BOOL
           bAutoCompression );

    Parameters
         pbAutoCompression          [out, retval]
         bAutoCompression           [in]
         A boolean variable specifies whether to use auto compression
         while converting files.
                TRUE = Use auto compression.
                FALSE = Do not use auto compression.
         Default is TRUE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           57
PDF CMD SDK


IPDFCompressionSetting Interface

2. AutoCompressionRate


    Description
          AutoCompressionRate property controls rate optimized for general
          use.

    Syntax
          HRESULT get_AutoCompressionRate ( long
          *plAutoCompressionRate );

           HRESULT put_AutoCompressionRate ( long
           lAutoCompressionRate );

    Parameters
         plAutoCompressionRate [out, retval]
         lAutoCompressionRate        [in]
         A long variable specifies the rate optimized for general use. Default
         is 50.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                            58
PDF CMD SDK


IPDFCompressionSetting Interface

3. CompressColor


    Description
          CompressColor property controls whether to compress color
          images while converting files.

    Syntax
          HRESULT get_CompressColor ( VARIANT_BOOL
          *pbCompressColor );

           HRESULT put_CompressColor ( VARIANT_BOOL
           bCompressColor );

    Parameters
         pbCompressColor [out, retval]
         bCompressColor [in]
         A boolean variable specifies whether to compress color images
         while converting files. Default is TRUE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           59
PDF CMD SDK


IPDFCompressionSetting Interface

4. ColorCompressMethod


    Description
          ColorCompressMethod property controls which predefined
          compression method is in use for compressing for color image..

    Syntax
          HRESULT get_ColorCompressMethod
          ( ColorCompressMethodEnum *peColorCompressMethod );

           HRESULT put_ColorCompressMethod
           ( ColorCompressMethodEnum eColorCompressMethod );

    Parameters
         peColorCompressMethod [out, retval]
         eColorCompressMethod [in]
         A ColorCompressMethodEnum variable specifies which predefined
         compression method to use for compressing color image. Default is
         CCM_JPEG_MEDIUM.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         Definition of ColorCompressMethodEnum:
         enum {
                 CCM_JPEG_HIGH               = 0,
                 CCM_JPEG_MEDIUMHIGH         = 1,
                 CCM_JPEG_MEDIUM             = 2,
                 CCM_JPEG_MEDIUMLOW          = 3,
                 CCM_JPEG_LOW                = 4,
                 CCM_ZIP                     = 5,
                 CCM_JPEG2000_HIGH           = 15,
                 CCM_JPEG2000_MEDIUMHIGH = 16,
                 CCM_JPEG2000_MEDIUM         = 17,
                 CCM_JPEG2000_MEDIUMLOW = 18,
                 CCM_JPEG2000_LOW            = 19
         } ColorCompressMethodEnum ;



                                                                           60
PDF CMD SDK


IPDFCompressionSetting Interface

5. ReSampleColor


     Description
           ReSampleColor controls whether to resample color image while
           converting files.

     Syntax
           HRESULT get_ReSampleColor ( VARIANT_BOOL
           *pbReSampleColor );

            HRESULT put_ReSampleColor ( VARIANT_BOOL
            bReSampleColor );

     Parameters
          pbReSampleColor [out, retval]
          bReSampleColor [in]
          A boolean variable specifies whether to resample color image while
          converting files. Default is TRUE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            61
PDF CMD SDK


IPDFCompressionSetting Interface

6. ColorReSampleMethod


    Description
          ColorReSampleMethod controls which predefined resample
          method is in use for resampling color image.

    Syntax
          HRESULT get_ColorReSampleMethod ( ReSampleMethodEnum
          *peColorReSampleMethod );

           HRESULT put_ColorReSampleMethod ( ReSampleMethodEnum
           eColorReSampleMethod );

    Parameters
         peColorReSampleMethod [out, retval]
         eColorReSampleMethod [in]
         A ReSampleMethodEnum variable specifies which predefined
         resample method is in use for resampling color image. Default is
         Down_Sample.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         enum {
               Down_Sample      = 0,
               Sub_Sample       =1
         } ReSampleMethodEnum ;




                                                                            62
PDF CMD SDK


IPDFCompressionSetting Interface

7. ColorReSampleResolution


     Description
           ColorReSampleResolution controls the minimum resolution for
           resampling color image.

     Syntax
           HRESULT get_ColorReSampleResolution ( long
           *plColorReSampleResolution );

            HRESULT put_ColorReSampleResolution ( long
            lColorReSampleResolution );

     Parameters
          plColorReSampleResolution          [out, retval]
          lColorReSampleResolution           [in]
          A long variable specifies the minimum resolution for resampling
          color image. Default is 150.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            63
PDF CMD SDK


IPDFCompressionSetting Interface

8. CompressGray


    Description
          CompressGray property control whether to compress gray images
          while converting files.

    Syntax
          HRESULT get_CompressGary ( VARIANT_BOOL
          *pbCompressGray );

           HRESULT put_CompressGray ( VARIANT_BOOL
           bCompressGray );

    Parameters
         pbCompressGray [out, retval]
         bCompressGray         [in]
         A boolean variable specifies whether to compress gray images
         while converting files. Default is TRUE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           64
PDF CMD SDK


IPDFCompressionSetting Interface

9. GrayCompressMethod


    Description
          GrayCompressMethod property controls which predefined
          compression method is in use for compressing gray image.

    Syntax
          HRESULT get_GrayCompressMethod
          ( ColorCompressMethodEnum *peGrayCompressMethod );

           HRESULT put_GrayCompressMethod
           ( ColorCompressMethodEnum eGrayCompressMethod );

    Parameters
         peGrayCompressMethod [out, retval]
         eGrayCompressMethod [in]
         A ColorCompressMethodEnum specifies which predefined
         compression method to use for compressing gray image. Default is
         CCM_JPEG_MEDIUM.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         See definition of ColorCompressMethod.




                                                                           65
PDF CMD SDK


IPDFCompressionSetting Interface

10.   ReSampleGray


      Description
            ReSampleGray property controls whether to resample gray image
            while converting files.

      Syntax
            HRESULT get_ReSampleGray ( VARIANT_BOOL
            *pbReSampleGray );

             HRESULT put_ReSampleGray ( VARIANT_BOOL
             bReSampleGary );

      Parameters
           pbReSampleGray [out, retval]
           bReSampleGray        [in]
           A boolean variable specifies whether to resample gray image while
           converting files. Default is TRUE.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             66
PDF CMD SDK


IPDFCompressionSetting Interface

11.   GrayReSampleMethod


      Description
            GrayReSampleMethod proerty controls which predefined resample
            method is in use for resampling gray image.

      Syntax
            HRESULT get_GrayReSampleMethod ( ReSampleMethodEnum
            *peGrayReSampleMethod );

             HRESULT put_GrayReSampleMethod s( ReSampleMethodEnum
             eGrayReSampleMethod );

      Parameters
           peGrayReSampleMethod [out, retval]
           eGrayReSampleMethod [in]
           A ReSampleMethodEnum variable specifies which predefined
           resample method is in use for resampling gray image. Default is
           Down_Sample.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           See definition of ReSampleMethodEnum.




                                                                             67
PDF CMD SDK


IPDFCompressionSetting Interface

12.   GrayReSampleResolution


      Description
            GrayReSampleResolution property controls the minimum resolution
            for resampling gray image.

      Syntax
            HRESULT get_GrayReSampleResolution ( long
            *plGrayReSampleResolution );

             HRESULT put_GrayReSampleResolution ( long
             lGrayReSampleResolution );

      Parameters
           plGrayReSampleResolution           [out, retval]
           lGrayReSampleResolution            [in]
           A long variable specifies the minimum resolution for resampling
           gray image. Default is 300.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             68
PDF CMD SDK


IPDFCompressionSetting Interface

13.   CompressMono


      Description
            CompressMono property controls whether to compress Mono
            images while converting files.

      Syntax
            HRESULT get_CompressMono ( VARIANT_BOOL
            *pbCompressMono );

             HRESULT put_CompressMono ( VARIANT_BOOL
             bCompressMono );

      Parameters
           pbCompressMono [out, retval]
           bCompressMono [in]
           A boolean variable specifies whether to compress mono images
           while converting files. Default is TRUE.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             69
PDF CMD SDK


IPDFCompressionSetting Interface

14.   MonoCompressMethod


      Description
            MonoCompressMethod property controls which predefined
            compression method is in use for compressing mono image.

      Syntax
            HRESULT get_MonoCompressMethod
            ( MonoCompressMethodEnum *peMonoCompressMethod );

             HRESULT put_MonoCompressMethod
             ( MonoCompressMethodEnum eMonoCompressMethod );

      Parameters
           peMonoCompressMethod [out, retval]
           eMonoCompressMethod [in]
           A MonoCompressMethodEnum specifies which predefined
           compression method to use for compressing mono image. Default
           is MCM_CCITT4.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           See definition of MonoCompressMethodEnum:
           enum {
                 MCM_ZIP = 5,
                 MCM_CCITT3 = 6,
                 MCM_CCITT4 = 7,
                 MCM_RunLength = 8,
           } MonoCompressMethodEnum ;




                                                                             70
PDF CMD SDK


IPDFCompressionSetting Interface

15.   ReSampleMono


      Description
            ReSampleMono property controls whether to resample mono
            image while converting files.

      Syntax
            HRESULT get_ReSampleMono ( VARIANT_BOOL
            *pbReSampleMono );

             HRESULT put_ReSampleMono ( VARIANT_BOOL
             bReSampleMono );

      Parameters
           pbReSampleMono [out, retval]
           bReSampleMono [in]
           A boolean variable specifies whether to resample Mono image
           while converting files. Default is TRUE.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             71
PDF CMD SDK


IPDFCompressionSetting Interface

16.   MonoReSampleMethod


      Description
            MonoReSampleMethod property controls which predefined
            resample method is in use for resampling mono image.

      Syntax
            HRESULT get_MonoReSampleMethod ( ReSampleMethodEnum
            *peMonoReSampleMethod );

             HRESULT put_MonoReSampleMethod ( ReSampleMethodEnum
             eMonoReSampleMethod );

      Parameters
           peMonoReSampleMethod [out, retval]
           eMonoReSampleMethod [in]
           A ReSampleMethodEnum variable specifies which predefined
           resample method is in use for resampling mono image. Default is
           Down_Sample.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           See definition of ReSampleMethodEnum.




                                                                             72
PDF CMD SDK


IPDFCompressionSetting Interface

17.   MonoReSampleResolution


      Description
            MonoReSampleResolution property controls the minimum
            resolution for resampling mono image.

      Syntax
            HRESULT get_MonoReSampleResolution ( long
            *plMonoReSampleResolution );

             HRESULT put_MOnoReSampleResolution ( long
             lMonoReSampleResolution );

      Parameters
           plMonoReSampleResolution           [out, retval]
           lMonoReSampleResolution            [in]
           A long variable specifies the minimum resolution for resampling
           mono image. Default is 300.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             73
PDF CMD SDK



v. IPDFFontEmbedSetting

This interface provides methods to get or set properties related to fond embed
settings while converting files. IPDFFontEmbedSetting interface should be
retrieved through GetFontEmbedSettingInterface method.




                                                                                 74
PDF CMD SDK


IPDFFontEmbedSetting Interface

1. EmbedAllFonts


     Description
           EmbedAllFonts property controls whether to embed all the fonts
           while converting files.

     Syntax
           HRESULT get_EmbedAllFonts ( VARIANT_BOOL
           *pbEmbedAllFonts );

            HRESULT put_EmbedAllFonts ( VARIANT_BOOL
            bEmbedAllFonts );

     Parameters
          pbEmbedAllFonts [out, retval]
          bEmbedAllFonts       [in]
          A VARIANT_BOOL Variable receives whether to ember all the
          fonts while converting files. Default is TRUE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            75
PDF CMD SDK


IPDFFontEmbedSetting Interface

2. SubsetFont


     Description
           SubsetFont property controls whether to subset the embedded font
           while converting files.

     Syntax
           HRESULT get_SubsetFont ( VARIANT_BOOL *pbSubsetFont );

            HRESULT put_SubsetFont ( VARIANT_BOOL bSubsetFont );

     Parameters
          pbSubsetFont          [out, retval]
          bSubsetFont           [in]
          A boolean variable specifies whether to subset the embedded font
          while converting files. Default is TRUE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            76
PDF CMD SDK


IPDFFontEmbedSetting Interface

3. SubsetThreshold


     Description
           SubsetThreshold property controls the maximum threshold for only
           embedding the referenced characters of specific font while
           converting files, otherwise all the characters in the font will be
           embedded.

     Syntax
           HRESULT get_SubsetThreshold ( long *plSubsetThreshold );

            HRESULT put_SubsetThreshold ( long lSubsetThreshold );

     Parameters
          plSubsetThreshold [out, retval]
          lSubsetThreshold [in]
          A to long variable specifies the maximum threshold for only
          embedding the referenced characters of specific font. Default is 75
          which means the maximum threshold is 75%.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            77
PDF CMD SDK


IPDFFontEmbedSetting Interface

4. EnableAlwaysEmbed


    Description
          EnableAlwaysEmbed property controls whether to enable the
          always embed font list

    Syntax
          HRESULT get_EnableAlwaysEmbed ( VARIANT_BOOL
          *pbEnableAlwaysEmbed );

           HRESULT put_EnableAlwaysEmbed ( VARIANT_BOOL
           bEnableAlwaysEmbed );

    Parameters
         pbEnableAlwaysEmbed [out, retval]
         bEnableAlwaysEmbed           [in]
         A boolean variable specifies whether to enable the always embed
         font list. Default is FALSE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           78
PDF CMD SDK


IPDFFontEmbedSetting Interface

5. AlwaysEmbedCount


    Description
          AlwaysEmbedCount property controls the number of fonts in the
          always embed font list.

    Syntax
          HRESULT get_AlwaysEmbedCount ( long
          *plAlwaysEmbedCount );

           HRESULT put_AlwaysEmbedCount ( long lAlwaysEmbedCount );

    Parameters
         plAlwaysEmbedCount          [out, retval]
         lAlwaysEmbedCount           [in]
         A long variable specifies the number of fonts in the always embed
         font list. Default is 0.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           79
PDF CMD SDK


IPDFFontEmbedSetting Interface

6. AlwaysEmbedFontName


    Description
          AlwaysEmbedFontName property controls the name of the font in
          the always embed font list.

    Syntax
          HRESULT get_AlwaysEmbedFontName ( long index, BSTR
          *psAlwaysEmbedFontName );

           HRESULT put_AlwaysEmbedFontName ( long index, BSTR
           sAlwaysEmbedFontName );

    Parameters
         index [in]
         Zero-based index of the font name in the always embed font list.
         psAlwaysEmbedFontName            [out, retval]
         sAlwaysEmbedFontName             [in]
         A BSTR variable specifies the font name indicated by index.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                            80
PDF CMD SDK


IPDFFontEmbedSetting Interface

7. EnableNeverEmbed


    Description
          EnableNeverEmbed property controls whether to enable the never
          embed font list

    Syntax
          HRESULT get_EnableNeverEmbed ( VARIANT_BOOL
          *pbEnableNeverEmbed );

           HRESULT put_EnableNeverEmbed ( VARIANT_BOOL
           bEnableNeverEmbed );

    Parameters
         pbEnableNeverEmbed           [out, retval]
         bEnableNeverEmbed            [in]
         A boolean variable specifies whether to enable the never embed
         font list. Default is FALSE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           81
PDF CMD SDK


IPDFFontEmbedSetting Interface

8. NeverEmbedCount


    Description
          NeverEmbedCount property controls the number of fonts in the
          never embed font list.

    Syntax
          HRESULT get_NeverEmbedCount ( long *plNeverEmbedCount );

           HRESULT put_NeverEmbedCount ( long lNeverEmbedCount );

    Parameters
         plNeverEmbedCount           [out, retval]
         lNeverEmbedCount            [in]
         A long variable specifies the number of fonts in the never embed
         font list. Default is 0.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                            82
PDF CMD SDK


IPDFFontEmbedSetting Interface

9. NeverEmbedFontName


    Description
          NeverEmbedFontName property controls the name of the font in
          the never embed font list.

    Syntax
          HRESULT get_NeverEmbedFontName ( long index, BSTR
          *psNeverEmbedFontName );

           HRESULT put_NeverEmbedFontName ( long index, BSTR
           sNeverEmbedFontName );

    Parameters
         index [in]
         Zero-based index of the font name in the never embed font list.
         psNeverEmbedFontName [out, retval]
         sNeverEmbedFontName [in]
         A BSTR variable specifies the font name indicated by index.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           83
PDF CMD SDK



vi. IWordMacroSetting

This interface provides methods to get or set properties related to WordMacro
settings while converting Microsoft Word files. IWordMacroSetting interface
should be retrieved through GetWordMacroSettingInterface method.




                                                                                84
PDF CMD SDK


IWordMacroSetting Interface

1. AutoBookmark


    Description
          AutoBookmark property controls whether to add bookmark while
          converting files.

    Syntax
          HRESULT get_AutoBookmark ( VARIANT_BOOL *
          pbAutoBookmark );

           HRESULT put_AutoBookmark ( VARIANT_BOOL
           bAutoBookmark );

    Parameters
         pbAutoBookmark [out, retval]
         bAutoBookmark        [in]
         A boolean variable specifies whether to add bookmark while
         converting files. Default is FALSE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           85
PDF CMD SDK


IWordMacroSetting Interface

2. DoNote


     Description
           DoNote property controls whether to add note while converting files.

     Syntax
           HRESULT get_DoNote ( VARIANT_BOOL * pbDoNote );

            HRESULT put_DoNote ( VARIANT_BOOL bDoNote );

     Parameters
          pbDoNote [out, retval]
          bDoNote         [in]
          A boolean variable specifies whether to add note while converting
          files. Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            86
PDF CMD SDK


IWordMacroSetting Interface

3. DoInternetLink


     Description
           DoInternetLink property controls whether to add internet link while
           converting files.

     Syntax
           HRESULT get_DoInternetLink ( VARIANT_BOOL *
           pbDoInternetLink );

            HRESULT put_DoInternetLink ( VARIANT_BOOL bDoInternetLink );

     Parameters
          pbDoInternetLink [out, retval]
          bDoInternetLink      [in]
          A boolean variable specifies whether to add internet link while
          converting files. Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                             87
PDF CMD SDK


IWordMacroSetting Interface

4. DoCrossDocuLink


    Description
          DoCrossDocuLink property controls whether to add cross
          document link while converting files.

    Syntax
          HRESULT get_DoCrossDocuLink ( VARIANT_BOOL *
          pbDoCrossDocuLink );

           HRESULT put_DoCrossDocuLink ( VARIANT_BOOL
           bDoCrossDocuLink );

    Parameters
         pbDoCrossDocuLink           [out, retval]
         DoCrossDocuLink             [in]
         A boolean variable specifies whether to add cross document link
         while converting files. Default is FALSE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           88
PDF CMD SDK


IWordMacroSetting Interface

5. DoCrossRefLink


     Description
           DoCrossRefLink property controls whether to add cross reference
           link while converting files.

     Syntax
           HRESULT get_DoCrossRefLink ( VARIANT_BOOL *
           pbDoCrossRefLink );

            HRESULT put_DoCrossRefLink ( VARIANT_BOOL
            bDoCrossRefLink );

     Parameters
          pbDoCrossRefLink [out, retval]
          DoCrossRefLink        [in]
          A boolean variable specifies whether to add cross reference link
          while converting files. Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                             89
PDF CMD SDK


IWordMacroSetting Interface

6. ConvertTextBox


     Description
           ConvertTextBox property controls whether to convert textbox while
           converting files.

     Syntax
           HRESULT get_ConvertTextBox ( VARIANT_BOOL *
           pbConvertTextBox );

            HRESULT put_ConvertTextBox ( VARIANT_BOOL
            bConvertTextBox );

     Parameters
          pbConvertTextBox [out, retval]
          bConvertTextBox [in]
          A boolean variable specifies whether to convert textbox while
          converting files. Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            90
PDF CMD SDK


IWordMacroSetting Interface

7. AutoComment


    Description
          AutoComment property controls whether to add comment while
          converting files.

    Syntax
          HRESULT get_AutoComment ( VARIANT_BOOL *
          pbAutoComment );

           HRESULT put_AutoComment ( VARIANT_BOOL bAutoComment );

    Parameters
         pbAutoComment        [out, retval]
         bAutoComment         [in]
         A boolean variable specifies whether to add comment while
         converting files. Default is FALSE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           91
PDF CMD SDK



II. PDFCmd
PDFCmd component object provides interface to modify PDF document including:
document information, security setting, open option, page manipulation,
watermark, combination, and package.




                                                                         92
PDF CMD SDK



i. IPDFCmd

IPDFCmd is the default sink interface of PDFCmd component object. Provides
methods for initializing PDFCmd component object besides methods to create
IPDFFileEdit, IPDFCombine and IPDFPackage interfaces.




                                                                             93
PDF CMD SDK


IPDFCmd Interface

1. Initialize


      Description
            Initialize the PDFCmd component.

      Syntax
            HRESULT Initialize ( BSTR sn, long reserved );

      Parameters
           sn
           [in] Serial number.
           reserved
           [in] Reserved for Zeon Corporation. Must be set to 0.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           PDFCmd must be initialized before invoking its method.




                                                                             94
PDF CMD SDK


IPDFCmd Interface

2. Uninitialize


      Description
            Close the PDFCmd component

      Syntax
            HRESULT Uninitialize ( );

      Parameters
           None

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           This method must be called before terminating the application.




                                                                             95
PDF CMD SDK


IPDFCmd Interface

3. CreateFileEditInterface


     Description
           Create a IPDFFileEdit interface.

     Syntax
           HRESULT CreateFileEditInterface ( LPDISPATCH *piFileEdit );

     Parameters
          piFileEdit
          [out, retval] A pointer to the returned IPDFFileEdit interface. NULL
          if create fails.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Application should release the interface after using it.




                                                                            96
PDF CMD SDK


IPDFCmd Interface

4. CreateCombineInterface


     Description
           Create a IPDFCombine interface.

     Syntax
           HRESULT CreateCombineInterface ( LPDISPATCH *piCombine );

     Parameters
          piCombine
          [out, retval] A pointer to the returned IPDFCombine interface.
          NULL if create fails.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Application should release the interface after using it.




                                                                            97
PDF CMD SDK


IPDFCmd Interface

5. CreatePackageInterface


     Description
           Create a IPDFCombine interface.

     Syntax
           HRESULT CreatePackageInterface ( LPDISPATCH *piPackage );

     Parameters
          piPackage
          [out, retval] A pointer to the returned IPDFCombine interface.
          NULL if create fails.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Application should release the interface after using it.




                                                                            98
PDF CMD SDK


IPDFCmd Interface

6. Compatible


     Description
           Compatible proptery controls PDF specification versions to be
           compatible of the modified PDF file.

     Syntax
           HRESULT get_Compatible ( CompatibleEnum * peCompatible );

            HRESULT put_Compatible ( CompatibleEnum eCompatible );

     Parameters
          peCompatible         [out, retval]
          eCompatible          [in]
          A CompatibleEnum variable specifies the PDF specification to be
          compatible. Default is Compatible_PDF14.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          See definition of CompatibleEnum.




                                                                            99
PDF CMD SDK



ii. IPDFFileEdit

IPDFFileEdit is the main interface for editing PDF document. Through you could
retrieve IPDFDocInfoSetting, IPDFSecuritySetting, IPDFOpenOptionSetting and
create IPDFPageEdit, IPDFTextWatermark, IPDFImageWatermark interfaces.




                                                                           100
PDF CMD SDK


IPDFFileEdit Interface

1. Open


    Description
          Open a PDF file.

    Syntax
          HRESULT Open ( VARIANT sFilePath, BSTR sOpenPassword,
          BSTR sOwnerPassword );

    Parameters
         sFilePath
         [in] Full path of the specific PDF file that you want to open. You
         should pass the type VT_BSTR to this variable and use bstrVal to
         store the file path.
         sOpenPassword
         [in] Password for opening the PDF file.
         sOwnerPassword
         [in] Password for modifying the PDF file.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           101
PDF CMD SDK


IPDFFileEdit Interface

2. NewPDF


    Description
          Create a new PDF file (without any page).

    Syntax
          HRESULT NewPDF ( );

    Parameters
         None

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         Caution: You can not save the new created PDF file until you add
         or insert at least one page to the PDF file.




                                                                           102
PDF CMD SDK


IPDFFileEdit Interface

3. Save


     Description
           Save the PDF file.

     Syntax
           HRESULT Save ( BSTR sFilePath);

     Parameters
          sFilePath
          [in] Full destination path of the PDF file.
          If sFilePath = NULL, save the PDF file directly, otherwise “save as”
          the PDF file as it is indicated by the value of sFilePath.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            103
PDF CMD SDK


IPDFFileEdit Interface

4. Close


     Description
           Close the PDF file.

     Syntax
           HRESULT Close ( void );

     Parameters
          None

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            104
PDF CMD SDK


IPDFFileEdit Interface

5. GetPageNum


    Description
          Get the page number of the PDF file.

    Syntax
          HRESULT GetPageNum ( long *plPageNum );

    Parameters
         plPageNum
         [out, retval] A pointer to a long variable specifies the page number
         of the PDF file.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           105
PDF CMD SDK


IPDFFileEdit Interface

6. CreatePageEditInterface


     Description
           Create a IPDFPageEdit interface.

     Syntax
           HRESULT CreatePageEditInterface ( LPDISPATCH *piPageEdit );

     Parameters
          piPageEdit
          [out, retval] A Pointer to the returned IPDFPageEdit interface.
          NULL if create fails.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Application should release the interface after using it.




                                                                            106
PDF CMD SDK


IPDFFileEdit Interface

7. AddPDFMark


    Description
          Add specific PDF mark file to the PDF file.

    Syntax
          HRESULT AddPDFMark ( BSTR sMarkFile );

    Parameters
         sMarkFile
         [in] Full path of the PDF mark file.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           107
PDF CMD SDK


IPDFFileEdit Interface

8. CreateTextWatermark


     Description
           Create a IPDFTextWatermark interface.

     Syntax
           HRESULT CreateTextWatermark ( LPDISPATCH
           *piTextWatermark );

     Parameters
          piTextWatermark
          [out, retval] A pointer to the returned IPDFTextWatermark
          interface. NULL if create fails.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Application should release the interface after using it.




                                                                            108
PDF CMD SDK


IPDFFileEdit Interface

9. CreateImageWatermark


     Description
           Create a IPDFImageWatermark interface.

     Syntax
           HRESULT CreateImageWatermark ( LPDISPATCH
           *piImageWatermark );

     Parameters
          piImageWatermark
          [out, retval] A pointer to the returned IPDFImageWatermark
          interface. NULL if create fails.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Application should release the interface after using it.




                                                                            109
PDF CMD SDK


IPDFFileEdit Interface

10.   GetDocInfoInterface


      Description
            Get the IPDFDocInfo interface.

      Syntax
            HRESULT GetDocInfoInterface ( LPDISPATCH *piDocInfo );

      Parameters
           piDocInfo
           [out, retval] A pointer to the returned IPDFDocInfo interface.
           NULL if create fails.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Application should release the interface after using it.




                                                                             110
PDF CMD SDK


IPDFFileEdit Interface

11.   GetSecurityInterface


      Description
            Get the IPDFSecurity interface.

      Syntax
            HRESULT GetSecurityInterface ( LPDISPATCH *piSecurity );

      Parameters
           piSecurity
           [out, retval] A pointer to the returned IPDFSecurity interface.
           NULL if create fails.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Application should release the interface after using it




                                                                             111
PDF CMD SDK


IPDFFileEdit Interface

12.   GetOpenOptionInterface


      Description
            Get the IPDFOpenOption interface.

      Syntax
            HRESULT GetOpenOptionInterface ( LPDISPATCH
            *piOpenOption );

      Parameters
           piOpenOption
           [out, retval] A pointer to the returned IPDFOpenOption interface.
           NULL if create fails.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Application should release the interface after using it




                                                                             112
PDF CMD SDK



iii. IPDFDocInfoSetting

Through IPDFDocInfoSetting interface, application could get or set the Document
Information of the specific PDF file. IPDFDocInfoSetting interface should be
retrieved through GetDocInfoInterface method.




                                                                           113
PDF CMD SDK


IPDFDocInfoSetting Interface

1. Title


      Description
            Title property controls the title of the PDF file.

      Syntax
            HRESULT get_Title ( BSTR *psTitle );

             HRESULT put_Title ( BSTR sTitle );

      Parameters
           psTitle     [out, retval]
           sTitle [in]
           A BSTR variable specifies the title of the PDF file.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             114
PDF CMD SDK


IPDFDocInfoSetting Interface

2. Subject


     Description
           Subject property controls the subject of the PDF file.

     Syntax
           HRESULT get_Subject ( BSTR *psSubject );

             HRESULT put_Subject ( BSTR sSubject );

     Parameters
          psSubject   [out, retval]
          sSubject    [in]
          A BSTR variable specifies the subject of the PDF file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            115
PDF CMD SDK


IPDFDocInfoSetting Interface

3. Keyword


    Description
          Keyword property controls the keyword of the PDF file.

    Syntax
          HRESULT get_Keyword ( BSTR *psKeyword );

           HRESULT put_Keyword ( BSTR sKeyword );

    Parameters
         psKeyword [out, retval]
         sKeyword    [in]
         A BSTR variable specifies the keyword of the PDF file.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           116
PDF CMD SDK


IPDFDocInfoSetting Interface

4. Author


     Description
           Author property controls the author of the PDF file.

     Syntax
           HRESULT get_Author ( BSTR *psAuthor );

            HRESULT put_Author ( BSTR sAuthor );

     Parameters
          psAuthor    [out, retval]
          sAuthor     [in]
          A BSTR variable specifies the author of the PDF file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            117
PDF CMD SDK


IPDFDocInfoSetting Interface

5. GetCustomDocInfoCount


    Description
          Get the number of custom document information of the specific
          PDF file.

    Syntax
          HRESULT GetCustomDocInfoCount ( long *plCustomInfoCount );

    Parameters
         plCustomInfoCount
         [out, retval] A pointer to a long variable specifies the number of
         custom document information of the specific PDF file.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           118
PDF CMD SDK


IPDFDocInfoSetting Interface

6. GetCustomDocInfo


     Description
           Get the specific custom document information of the PDF file.

     Syntax
           HRESULT GetCustomDocInfo ( long index, BSTR *psCustomKey,
           BSTR *psCustomValue );

     Parameters
          index
          [in] Zero-based index of the custom document information in the
          PDF file.
          psCustomKey
          [out, retval] A pointer to a BSTR variable specifies the key name
          of the custom document information.
          psCustomValue
          [out, retval] A pointer to a BSTR variable specifies the value of
          the custom document information.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            119
PDF CMD SDK


IPDFDocInfoSetting Interface

7. AddCustomDocInfo


    Description
          Add a custom document information to the PDF file.

    Syntax
          HRESULT AddCustomDocInfo ( BSTR sCustomKey, BSTR
          sCustomValue );

    Parameters
         sCustomKey
         [out, retval] Specifies the key name of the custom document
         information that you want to add to the PDF file.
         sCustomValue
         [out, retval] Specifies the corresponding value of the custom
         document information.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           120
PDF CMD SDK


IPDFDocInfoSetting Interface

8. DeleteCustomDocInfo


     Description
           Delete a specific custom document information from the PDF file.

     Syntax
           HRESULT DeleteCustomDocInfo ( BSTR sCustomKey );

     Parameters
          sCustomKey
          [out, retval] Specifies the key name of the custom document
          information that you want to delete.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            121
PDF CMD SDK


IPDFDocInfoSetting Interface

9. Creator


     Description
           Creator property controls the creator of PDF file.

     Syntax
           HRESULT get_Creator ( BSTR *psCreator );

             HRESULT put_Creator ( BSTR sCreator );

     Parameters
          psCreator   [out, retval]
          sCreator    [in]
          A BSTR variable specifies the creator of the PDF file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            122
PDF CMD SDK


IPDFDocInfoSetting Interface

10.   Producer


      Description
            Producer property controls the producer of PDF file.

      Syntax
            HRESULT get_Producer ( BSTR *psProducer );

             HRESULT put_Producer ( BSTR sProducer );

      Parameters
           psProducer [out, retval]
           sProducer [in]
           A BSTR variable specifies the producer of the PDF file.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             123
PDF CMD SDK


IPDFDocInfoSetting Interface

11.   LoadDocInfoSettingFromIni


      Description
            Load document information setting from ini setting file.

      Syntax
            HRESULT LoadDocInfoSettingFromIni ( BSTR *psIniPath );

      Parameters
           psIniPath
           [in] the path of document information setting file.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             124
PDF CMD SDK



iv. IPDFSecuritySetting

Provide methods to get or set security property of PDF files. IPDFSecuritySetting
interface should be retrieved through GetSecurityInterface methodl




                                                                             125
PDF CMD SDK


IPDFSecuritySetting Interface

1. open_password


    Description
          open_password property controls the open password of specific
          PDF files.

    Syntax
          HRESULT get_open_password ( BSTR *psOpenPassword );

           HRESULT put_open_password ( BSTR sOpenPassword );

    Parameters
         psOpenPassword [out, retval]
         sOpenPassword     [in]
         A BSTR variable specifies the open password of the PDF files.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           126
PDF CMD SDK


IPDFSecuritySetting Interface

2. owner_password


    Description
          owner_password property controls the owner password of specific
          PDF files.

    Syntax
          HRESULT get_owner_password ( BSTR *psOwnerPassword );

           HRESULT put_owner_password ( BSTR sOwnerPassword );

    Parameters
         psOwnerPassword [out, retval]
         sOwnerPassword [in]
         A BSTR variable specifies the owner password of the PDF files.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           127
PDF CMD SDK


IPDFSecuritySetting Interface

3. canPrint


     Description
           canPrint property controls whether the PDF file is allowed to be
           printed.

     Syntax
           HRESULT get_canPrint ( VARIANT_BOOL *pbCanPrint );

              HRESULT put_canPrint ( VARIANT_BOOL bCanPrint );

     Parameters
          pbCanPrint [out, retval]
          bCanPrint   [in]
          A boolean variable specifies whether the PDF file is allowed to be
          printed.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                              128
PDF CMD SDK


IPDFSecuritySetting Interface

4. canAnnotate


     Description
           canPrint property controls whether you can add annotate to the
           PDF file.

     Syntax
           HRESULT get_canAnnotate ( VARIANT_BOOL *pbCanAnnotate );

            HRESULT put_canAnnotate ( VARIANT_BOOL bCanAnnotate );

     Parameters
          pbCanAnnotate       [out, retval]
          bCanAnnotate        [in]
          A boolean variable specifies whether you can add annotation to the
          PDF file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            129
PDF CMD SDK


IPDFSecuritySetting Interface

5. canCopy


    Description
          canCopy property controls whether the PDF file is allowed to be
          copied.

    Syntax
          HRESULT get_canCopy ( VARIANT_BOOL *pbCanCopy );

           HRESULT put_canCopy ( VARIANT_BOOL bCanCopy );

    Parameters
         pbCanCopy [out, retval]
         bCanCopy [in]
         A boolean variable specifies whether the PDF file is allowed to be
         copied.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                            130
PDF CMD SDK


IPDFSecuritySetting Interface

6. canModify


     Description
           canModify property controls whether the PDF file is allowed to be
           modified.

     Syntax
           HRESULT get_canModify ( VARIANT_BOOL *pbCanModify );

            HRESULT put_canModify ( VARIANT_BOOL bCanModify );

     Parameters
          pbCanModify         [out, retval]
          bCanModify          [in]
          A boolean variable specifies whether the PDF file is allowed to be
          modified.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            131
PDF CMD SDK


IPDFSecuritySetting Interface

7. canContentCopyAndExtraction


     Description
           canContentCopyAndExtraction property controls whether the
           content of the PDF file is allowed to be copied and extracted.

     Syntax
           HRESULT get_canContentCopyAndExtraction ( VARIANT_BOOL
           *pbCanContentCopyAndExtraction );

            HRESULT put_canContentCopyAndExtraction ( VARIANT_BOOL
            bCanContentCopyAndExtraction );

     Parameters
          pbCanContentCopyAndExtraction           [out, retval]
          bCanContentCopyAndExtraction            [in]
          A boolean variable specifies whether the content of the PDF file is
          allowed to be copied and extracted.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            132
PDF CMD SDK


IPDFSecuritySetting Interface

8. canContentAccessForVisuallyImpaired


     Description
           canContentAccessForVisuallyImpaired property controls whether
           the content of the PDF file is allowed to be accessed for visually
           impaired.

     Syntax
           HRESULT get_canContentAccessForVisuallyImpaired
           ( VARIANT_BOOL *pbCanContentAccessForVisuallyImpaired );

            HRESULT put_canContentAccessForVisuallyImpaired
            ( VARIANT_BOOL bCanContentAccessForVisuallyImpaired );

     Parameters
          pbCanContentAccessForVisuallyImpaired          [out, retval]
          bCanContentCopyAndExtraction                   [in]
          A boolean variable specifies whether the content of the PDF file is
          allowed to be accessed for visually impaired.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            133
PDF CMD SDK


IPDFSecuritySetting Interface

9. encryptionLevel


     Description
           encryptionLevel property controls which predefined encryption level
           is in use.

     Syntax
           HRESULT get_encryptionLevel ( EncryptionLevelEnum
           *peEncryptionLevel );

            HRESULT put_encryptionLevel ( EncryptionLevelEnum
            eEncryptionLevel );

     Parameters
          peEncryptionLevel [out, retval]
          eEncryptionLevel [in]
          A EncryptionLevelEnum variable specifies which predefined
          encryption level is in use. Default is EL_40Bits.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of EncryptionLevelEnum:
          enum {
                  EL_None            = 0,
                  EL_40Bits          = 40,
                  EL_128Bits         = 128,
                  EL_128BitsAES      = 1280
          } EncryptionLevelEnum ;




                                                                            134
PDF CMD SDK


IPDFSecuritySetting Interface

10.   changesAllowed


      Description
            changesAllowed property controls which predefined allowed
            change level is in use.

      Syntax
            HRESULT get_changesAllowed ( ChangesAllowedEnum
            *peChangesAllowed );

             HRESULT put_changesAllowed ( ChangesAllowedEnum
             eChangesAllowed );

      Parameters
           peChangesAllowed [out, retval]
           eChangesAllowed [in]
           A ChangesAllowedEnum variable specifies which predefined
           allowed change level is in use. Default is CA_GENERAL.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Definition of ChangesAllowedEnum:
           enum {
                   CA_NOT_ALLOWED         = 0,
                   CA_ONLY_DOCUMENT = 1,
                   CA_ONLY_FORM           = 2,
                   CA_COMMENT_AUTHOR = 3,
                   CA_GENERAL             =4
           } ChangesAllowedEnum ;




                                                                             135
PDF CMD SDK


IPDFSecuritySetting Interface

11.   printingAllowed


      Description
            printingAllowed property controls which predefined allowed printing
            level to use.

      Syntax
            HRESULT get_printingAllowed ( PrintingAllowedEnum
            *pePrintingAllowed );

             HRESULT put_printingAllowed ( PrintingAllowedEnum
             ePrintingAllowed );

      Parameters
           pePrintingAllowed [out, retval]
           ePrintingAllowed       [in]
           A PrintingAllowedEnum variable specifies which predefined allowed
           printing level is in use. Default is PA_FULL_ALLOWED.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Definition of PrintingAllowedEnum:
           enum {
                   PA_NOT_ALLOWED           = 0,
                   PA_LOW_RESOLUTION = 1,
                   PA_FULL_ALLOWED          =2
           } PrintingAllowedEnum;




                                                                             136
PDF CMD SDK


IPDFSecuritySetting Interface

12.   SetSecurity


      Description
            Set the security property to the PDF file.

      Syntax
            HRESULT SetSecurity ( );

      Parameters
           None

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           You must call this method to apply all the previous setting to the
           PDF file.




                                                                                137
PDF CMD SDK


IPDFSecuritySetting Interface

13.   RemoveSecurity


      Description
            Remove security property of the PDF file.

      Syntax
            HRESULT RemoveSecurity ( );

      Parameters
           None

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             138
PDF CMD SDK


IPDFSecuritySetting Interface

14.   LoadSecuritySettingFromIni


      Description
            Load Security setting from ini setting file.

      Syntax
            HRESULT LoadSecuritySettingFromIni ( BSTR sIniPath );

      Parameters
            sIniPath
            [in] The path of security ini setting file.
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             139
PDF CMD SDK


IPDFSecuritySetting Interface

15.   RemoveSecurityWithPassword


      Description
            Remove PDF file’s security with password.

      Syntax
            HRESULT RemoveSecurityWithPassword ( BSTR password );

      Parameters
            password
            [in] The password of PDF file.
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             140
PDF CMD SDK



v. IPDFOpenOptionSetting

This interface provides method for get or set open option of the PDF file.
IPDFOpenOptionSetting interface should be retrieved through
GetOpenOptionInterface method.




                                                                             141
PDF CMD SDK


IPDFOpenOptionSetting Interface

1. Magnification


     Description
           Magnification property controls which predefined magnification level
           is in use.

     Syntax
           HRESULT get_Magnification ( MagnificationEnum
           *peMagnification );

            HRESULT put_Magnification ( MagnificationEnum eMagnification );

     Parameters
          peMagnification       [out, retval]
          eMagnification        [in]
          A MagnificationEnum variable specifies which predefined
          magnification level is in use. Default is Scale_Default.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of MagnificationEnum:
          enum {
                  Scale_Default       = 0,
                  Scale_FitVisible    = 1,
                  Scale_FitWidth      = 2,
                  Scale_FitInWindow = 3,
                  Scale_25            = 25,
                  Scale_50            = 50,
                  Scale_75            = 75,
                  Scale_100           = 100,
                  Scale_125           = 125,
                  Scale_150           = 150,
                  Scale_200           = 200,
                  Scale_400           = 400,
                  Scale_800           = 800,
                  Scale_1600          = 1600
          } MagnificationEnum;


                                                                            142
PDF CMD SDK


IPDFOpenOptionSetting Interface

2. InitialPage


      Description
            InitialPage property controls the initial page to display when open
            the PDF file.

      Syntax
            HRESULT get_InitialPage ( long *peInitialPage );

             HRESULT put_InitialPage ( long eInitialPage );

      Parameters
           peInitialPage       [out, retval]
           peInitialPage       [in]
           A long variable specifies which page to display when open the PDF
           file. Default is 0.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             143
PDF CMD SDK


IPDFOpenOptionSetting Interface

3. Layout


     Description
           Layout property controls the initial page layout.

     Syntax
           HRESULT get_Layout ( LayoutEnum *peLayout );

            HRESULT put_Layout ( LayoutEnum eLayout );

     Parameters
          peLayout    [out, retval]
          eLayout     [in]
          A LayoutEnum variable specifies the initial page layout. Default is
          Layout_Default.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of LayoutEnum:
          enum {
                  Layout_Default               = 0,
                  Layout_SinglePage            = 1,
                  Layout_ContinuousPage        = 2,
                  Layout_FacingPage            = 3,
                  Layout_ContinuousFacing      =4
          } LayoutEnum;




                                                                            144
PDF CMD SDK


IPDFOpenOptionSetting Interface

4. InitialWindow


     Description
           InitialWindow property controls the initial window’s size and position.

     Syntax
           HRESULT get_InitialWindow ( InitialWindowEnum
           *peInitialWindow );

            HRESULT put_InitialWindow ( InitialWindowEnum eInitialWindow );

     Parameters
          peInitialWindow       [out, retval]
          eInitialWindow        [in]
          A InitialWindowEnum variable specifies the initial window’s size and
          position. Default is IW_Default.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of InitialWindowEnum:
          enum {
                  IW_Default          = 0,
                  IW_ResizeWindow = 1,
                  IW_CenterWindow = 2,
                  IW_FullScreen       =4
          } InitWindowEnum;




                                                                             145
PDF CMD SDK


IPDFOpenOptionSetting Interface

5. NavigationPane


     Description
           NavigationPane property controls the initial navigation pane to
           show.

     Syntax
           HRESULT get_NavigationPane ( NavigationPaneEnum
           *peNavigationPane );

            HRESULT put_NavigationPane ( NavigationPaneEnum
            eNavigationPane );

     Parameters
          peNavigationPane [out, retval]
          eNavigationPane [in]
          A NavigationPaneEnum variable specifies the initial navigation
          pane to show. Default is NP_None.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of NavigationPaneEnum:
          enum {
                  NP_None            = 0,
                  NP_Bookmark        = 1,
                  NP_Thumbnail       = 2,
                  NP_Comments        =3
          } NavigationPaneEnum;




                                                                             146
PDF CMD SDK


IPDFOpenOptionSetting Interface

6. HideToolbar


     Description
           HideToolbar property controls whether to hide the toolbar when
           PDF file is opened.

     Syntax
           HRESULT get_HideToolbar ( VARIANT_BOOL *peHideToolbar );

            HRESULT put_HideToolbar ( VARIANT_BOOL eHideToolbar );

     Parameters
          peHideToolbar       [out, retval]
          eHideToolbar        [in]
          A boolean variable specifies whether to hide the toolbar when the
          PDF file is opened.
                 TRUE = Hide the toolbar.
                 FALSE = Do not hide the toolbar.
          Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            147
PDF CMD SDK


IPDFOpenOptionSetting Interface

7. HideMenubar


     Description
           HideMeunbar property controls whether to hide the menubar when
           PDF file is opened.

     Syntax
           HRESULT get_HideMenubar ( VARIANT_BOOL *peHideMenubar );

            HRESULT put_HideMenubar ( VARIANT_BOOL eHideMenubar );

     Parameters
          peHideMenubar       [out, retval]
          eHideToolbar        [in]
          A boolean variable specifies whether to hide the menubar when the
          PDF file is opened.
                 TRUE = Hide the menubar.
                 FALSE = Do not hide the menubar.
          Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            148
PDF CMD SDK


IPDFOpenOptionSetting Interface

8. HideControl


     Description
           HideControl property controls whether to hide the window control
           when PDF file is opened.

     Syntax
           HRESULT get_HideControl ( VARIANT_BOOL *peHideControl );

            HRESULT put_HideControl ( VARIANT_BOOL eHideControl );

     Parameters
          peHideControl       [out, retval]
          eHideControl        [in]
          A boolean variable specifies whether to hide the window control
          when the PDF file is opened.
                TRUE = Hide the window control.
                FALSE = Do not hide the window control.
          Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            149
PDF CMD SDK


IPDFOpenOptionSetting Interface

9. ShowDocumentTitle


     Description
           ShowDocumentTitle property controls whether to display the
           document title on the window caption.

     Syntax
           HRESULT get_ShowDocumentTitle ( VARIANT_BOOL
           *peShowDocumentTitle );

            HRESULT put_ShowDocumentTitle ( VARIANT_BOOL
            eShowDocumentTitle );

     Parameters
          peShowDocumentTitle        [out, retval]
          eShowDocumentTitle         [in]
          A boolean variable specifies whether to display the document title
          on the window caption.
                 TRUE = Show the document title.
                 FALSE = Do not Show the document title.
          Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            150
PDF CMD SDK


IPDFOpenOptionSetting Interface

10.   LoadOpenSettingFromIni


      Description
            Load open setting from ini setting file.

      Syntax
            HRESULT LoadOpenSettingFromIni ( BSTR sIniPath );

      Parameters
            sIniPath
            [in] Specifies ini file path for opening option setting.
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             151
PDF CMD SDK



vi. IPDFPageEdit

Provide methods for general operation of a single page. Application should
create IPDFPageEdit interface through CreatePageEditInterface method and
release it interface after using.




                                                                             152
PDF CMD SDK


IPDFPageEdit Interface

1. CreateNewPage


    Description
          Create a new blank page.

    Syntax
          HRESULT CreateNewPage (long lAfterPageNum, long lWidth, long
          lHeight);

    Parameters
         lAfterPageNum
         [in] The page number after which the new page is inserted. The
         first page is 0. Use-1 to insert the new page at the beginning of a
         document.
         lWidth
         [in] Page’s width.
         lHeight
         [in] Page’s height.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           153
PDF CMD SDK


IPDFPageEdit Interface

2. Open


    Description
          Open a page of the specific PDF file.

    Syntax
          HRESULT Open ( long lPageNo );

    Parameters
         lPageNo
         [in] Zero-based page number of the page you want to open.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           154
PDF CMD SDK


IPDFPageEdit Interface

3. GetPageWidthHeight


     Description


     Syntax
           HRESULT GetPageWidthHeight ( VARIANT_BOOL
           bMarkedAreaOnly, long *plWidth, long *plHeight );

     Parameters
          bMarkedAreaOnly
          [in] Specifies whether to get the width and height of the marked
          area only.
          plWidth
          [out, retval] A pointer to a long variable specifies the page’s width.
          plHeight
          [out, retval] A pointer to a long variable specifies the page’s
          height.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          This method could only be called after having opened or created a
          page.




                                                                            155
PDF CMD SDK


IPDFPageEdit Interface

4. Delete


     Description
           Delete a specific page.

     Syntax
           HRESULT Delete ( );

     Parameters
          None

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          If you have deleted a page, you can not do any other operations to
          that deleted page!




                                                                            156
PDF CMD SDK


IPDFPageEdit Interface

5. Rotate


     Description
           Rotate a page.

     Syntax
           HRESULT Rotate ( VARIANT_BOOL bClockwise );

     Parameters
          bClockwise
          [in] Specifies how to rotate the page.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None.




                                                                            157
PDF CMD SDK


IPDFPageEdit Interface

6. Crop


     Description
           Crop a page.

     Syntax
           HRESULT Crop ( double dLeft, double dTop, double dRight, double
           dBottom );

     Parameters
          dLeft, dTop, dRight, dBottom
          [in] Crop rectangle.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            158
PDF CMD SDK


IPDFPageEdit Interface

7. Insert


      Description
            Insert another page after current page.

      Syntax
            HRESULT Insert ( IPDFPageEdit *piSrcPage );

      Parameters
           piSrcPage
           [in] A pointer to a IPDFPageEdit interface specifies the page you
           want to insert after the current page.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             159
PDF CMD SDK


IPDFPageEdit Interface

8. Close


     Description
           Close IPDFPageEdit interface.

     Syntax
           HRESULT Close ( );

     Parameters
          None

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          You muse close IPDFPageEdit interface after using it.




                                                                            160
PDF CMD SDK


IPDFPageEdit Interface

9. GetPageBitmap


     Description
           Convert one page of PDF file into bitmap.

     Syntax
           HRESULT GetPageBitmap ( float fScale, VARIANT_BOOL
           bMarkedAreaOnly, long * pHBitmap );

     Parameters
          fScale
          [in] Scale number of bitmap.
          bMarkedAreaOnly
          [in] Whether to only convert marked area into bitmap.
          pHBitmap
          [out, retval] HBITMAP handle.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          After get HBITMAP handle, must use DeleteObject of Windows API
          to release memory.




                                                                            161
PDF CMD SDK



vii.   IPDFWatermarkInfo

Provide methods to get or set general properties of watermark information.
IPDFWatermarkInfo interface is the base interface of both IPDFTextWatermark
and IPDFImageWatermark interfaces. So all the properties defined here also
apply to the two derived interfaces.




                                                                         162
PDF CMD SDK


IPDFWatermarkInfo Interface

1. Anchor


     Description
           Anchor property controls the anchor point of the watermark on the
           page.

     Syntax
           HRESULT get_Anchor ( AnchorEnum *peAnchor );

            HRESULT get_Anchor ( AnchorEnum eAnchor );

     Parameters
          peAnchor     [out, retval]
          eAnchor      [in]
          A AnchorEnum variable specifies the anchor point of the watermark
          on the page. Default is Anchor_LeftTop.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of AnchorEnum
          enum{
                  Anchor_PageCenter                   = 0,
                  Anchor_LeftTop                      = 1,
                  Anchor_RightTop                     = 2,
                  Anchor_RightBottom                  = 3,
                  Anchor_LeftBottom                   = 4,
                  Anchor_TopEdgeCenter                = 5,
                  Anchor_RightEdgeCenter              = 6,
                  Anchor_BottomEdgeCenter             = 7,
                  Anchor_LeftEdgeCenter               =8
          } AnchorEnum;




                                                                            163
PDF CMD SDK


IPDFWatermarkInfo Interface

2. Unit


     Description
           Unit property controls the unit of watermark.

     Syntax
           HRESULT get_Unit ( UnitEnum *peUnit );

            HRESULT put_Unit ( UnitEnum eUnit );

     Parameters
          peUnit       [out, retval]
          eUnit        [in]
          A UnitEnum variable specifies the unit of the watermark on the
          page. Default is Unit_Inches.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of UintEnum
          enum{
                  Unit_Inches = 0,
                  Unit_MM      = 1,
                  Unit_Points = 2
          } UnitEnum;




                                                                            164
PDF CMD SDK


IPDFWatermarkInfo Interface

3. XOffset


     Description
           XOffset property controls the distance in given unit between
           watermark and leftside of the page.

     Syntax
           HRESULT get_XOffset ( double *pdXOffset );

             HRESULT put_XOffset ( double dXOffset );

     Parameters
          pdXOffset     [out, retval]
          dXOffset      [in]
          A double specifies the distance in given unit between watermark
          and leftside of the page.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            165
PDF CMD SDK


IPDFWatermarkInfo Interface

4. YOffset


     Description
           YOffset property controls the distance in given unit between
           watermark and topside of the page.

     Syntax
           HRESULT get_YOffset ( double *pdYOffset );

             HRESULT put_YOffset ( double dYOffset );

     Parameters
          pdYOffset    [out, retval]
          dYOffset     [in]
          A double specifies the distance in given unit between watermark
          and topside of the page.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            166
PDF CMD SDK


IPDFWatermarkInfo Interface

5. CrossPageWatermark


    Description
          CrossPageWatermark property controls whether watermark should
          be displayed on 2 continuous pages.

    Syntax
          HRESULT get_CrossPageWatermark ( VARIANT_BOOL
          *pbCrossPageWatermark );

           HRESULT put_CrossPageWatermark ( VARIANT_BOOL
           bCrossPageWatermark );

    Parameters
         pbCrossPageWatermark [out, retval]
         bCrossPageWatermark        [in]
         A boolean variable specifies whether watermark should be
         displayed on 2 continuous pages. Default is FALSE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           167
PDF CMD SDK


IPDFWatermarkInfo Interface

6. Binding


     Description
           Binding property controls which predefined cross page watermark
           position is in use.

     Syntax
           HRESULT get_Binding ( BindingEnum *peBinding );

             HRESULT put_Binding ( BindingEnum eBinding );

     Parameters
          peBinding   [out, retval]
          eBinding    [in]
          A BindingEnum variable specifies which predefined cross page
          watermark position is in use. Default is LEFT_BINDING.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of BindingEnum:
          enum
          {
                  LEFT_BINDING       = 0,
                  RIGHT_BINDING = 1,
                  TOP_BINDING        =2
          }; BindingEnum;

             For more information of every specific property or settings, please
             see “PDF Driver SDK” as a reference.




                                                                              168
PDF CMD SDK


IPDFWatermarkInfo Interface

7. Clearence


     Description
           Get the margin between cross page watermark and the page edge.

     Syntax
           HRESULT get_Clearence ( double *pdClearence );

            HRESULT put_Clearence ( double dClearence );

     Parameters
          pdClearence [out, retval]
          dClearence [in]
          A double variable specifies the margin between cross page
          watermark and the page edge. Default is 0.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            169
PDF CMD SDK


IPDFWatermarkInfo Interface

8. Position


     Description
           Position property controls the distance between cross page
           watermark and the page origin.

     Syntax
           HRESULT get_Position ( double *pdPosition );

              HRESULT put_Position ( double dPosition );

     Parameters
          pdClearence [out, retval]
          dClearence [in]
          A double variable specifies the distance between cross page
          watermark and the page origin. Default is 148.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            170
PDF CMD SDK


IPDFWatermarkInfo Interface

9. Duplex


     Description
           Duplex property controls whether to duplex printing with the correct
           cross page watermark on facing pages.

     Syntax
           HRESULT get_Duplex ( VARIANT_BOOL *pbDuplex );

            HRESULT put_Duplex ( VARIANT_BOOL bDuplex );

     Parameters
          pbDuplex      [out, retval]
          bDuplex       [in]
          A boolean variable specifies whether to duplex printing with the
          correct cross page watermark on facing pages. Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            171
PDF CMD SDK


IPDFWatermarkInfo Interface

10.   Angle


      Description
            Angle property controls the rotation angle of the watermark.

      Syntax
            HRESULT get_Angle ( long *psAngle );

             HRESULT put_Angle ( long sAngle );

      Parameters
           psAngle       [out, retval]
           sAngle        [in]
           A long variable specifies the rotation angle of the watermark.
           Default is 0.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             172
PDF CMD SDK


IPDFWatermarkInfo Interface

11.   Opacity


      Description
            Opacity property controls the opacity of the text watermark.

      Syntax
            HRESULT get_Opacity ( double *pdOpacity );

             HRESULT put_Opacity ( double dOpacity );

      Parameters
           pdOpacity [out, retval]
           dOpacity      [in]
           A double variable specifies the opacity of the text watermark.
           Default is 100 – fully obscure the underline contents – no
           transprancy.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             173
PDF CMD SDK


IPDFWatermarkInfo Interface

12.   Background


      Description
            Background property controls whether watermark is background of
            PDF file.

      Syntax
            HRESULT get_Background ( VARIANT_BOOL *bBackground );

             HRESULT put_Background ( VARIANT_BOOL bBackground );

      Parameters
           bBackground            [out, retval]
           bBackground            [in]
           A bool variable specifies whether watermark is background of PDF
           file. Default value is FALSE.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             174
PDF CMD SDK


IPDFWatermarkInfo Interface

13.   ShowOnScreen


      Description
            ShowOnScreen property controls whether watermark is showed on
            screen.

      Syntax
            HRESULT get_ShowOnScreen ( VARIANT_BOOL
            *bShowOnScreen );

             HRESULT put_ShowOnScreen ( VARIANT_BOOL
             bShowOnScreen );

      Parameters
           bShowOnScreen [out, retval]
           bShowOnScreen [in]
           A bool variable specifies whether watermark is showed on screen.
           Default value is FALSE.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             175
PDF CMD SDK


IPDFWatermarkInfo Interface

14.   ShowOnPrint


      Description
            ShowOnPrint property controls whether watermark is showed while
            printing.

      Syntax
            HRESULT get_ShowOnPrint ( VARIANT_BOOL *bShowOnPrint );

             HRESULT put_ShowOnPrint ( VARIANT_BOOL bShowOnPrint );

      Parameters
           bShowOnPrint          [out, retval]
           bShowOnPrint          [in]
           A bool variable specifies whether watermark is showed while
           printing. Default value is FALSE.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             176
PDF CMD SDK


IPDFWatermarkInfo Interface

15.   PageRange


      Description
            PageRange property controls page range of PDF file with
            watermark.

      Syntax
            HRESULT get_PageRange ( BSTR * psPageRange );

             HRESULT put_PageRange ( BSTR sPageRange );

      Parameters
           psPageRange       [out, retval]
           sPageRange        [in]
           A BSTR variable specifies page range of PDF file with watermark.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             177
PDF CMD SDK


IPDFWatermarkInfo Interface

16.   EvenOdd


      Description
            EvenOdd property controls which even and/or odd pages of PDF
            file will have watermark.

      Syntax
            HRESULT get_EvenOdd (EvenOddRangeEnum * peEvenOdd );

             HRESULT put_EvenOdd (EvenOddRangeEnum eEvenOdd );

      Parameters
           peEvenOdd [out, retval]
           eEvenOdd [in]
           A EvenOddRangeEnum value recieves which even and/or odd
           pages of PDF file will have watermark. Default value is
           Range_EvenOdd.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Enum EvenOddRangeEnum {
                 Range_EvenOdd = 0,
                 Range_OddOnly  = 1,
                 Range_EvenOnly = 2
           } EvenOddrangeEnum;




                                                                             178
PDF CMD SDK


IPDFWatermarkInfo Interface

17.   AddWatermark


      Description
            Add watermark to the PDF file.

      Syntax
            HRESULT AddWatermark ( void );

      Parameters
            None
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             179
PDF CMD SDK


IPDFWatermarkInfo Interface

18.   Redo


      Description
            Redo operation of watermark.

      Syntax
            HRESULT Redo ( void );

      Parameters
            None
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             180
PDF CMD SDK


IPDFWatermarkInfo Interface

19.   Undo


      Description
            Undo operation of watermark.

      Syntax
            HRESULT Undo ( void );

      Parameters
            None
      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             181
PDF CMD SDK



viii. IPDFTextWatermark

Provide methods for editing settings of text watermark. IPDFTextWatermark is
derived from IPDFWatermarkInfo interface and should be create through
CreateTextWatarmark method.




                                                                           182
PDF CMD SDK


IPDFTextWatermark Interface

1. Text


     Description
           Text property controls the watermark text string.

     Syntax
           HRESULT get_Text ( BSTR *psText );

            HRESULT put_Text ( BSTR sText );

     Parameters
          psText      [out, retval]
          sText       [in]
          A BSTR variable specifies the watermark text string.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            183
PDF CMD SDK


IPDFTextWatermark Interface

2. TextFont


     Description
           TextFont the watermark text font.

     Syntax
           HRESULT get_TextFont ( BSTR *psTextFont );

            HRESULT put_TextFont ( BSTR sTextFont );

     Parameters
          psTextFont [out, retval]
          sTextFont   [in]
          A BSTR variable specifies the watermark text font. Default is Arial.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            184
PDF CMD SDK


IPDFTextWatermark Interface

3. TextSize


     Description
           TextSize property controls the watermark text size.

     Syntax
           HRESULT get_TextSize ( long *psTextSize );

              HRESULT put_TextSize ( long sTextSize );

     Parameters
          psTextSize [out, retval]
          sTextSize     [in]
          A long variable specifies the watermark text size. Default is 72.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                              185
PDF CMD SDK


IPDFTextWatermark Interface

4. TextStyle


     Description
           TextStyle property controls the watermark text font style.

     Syntax
           HRESULT get_Text Style ( FontStyleEnum *peTextStyle );

            HRESULT put_Text Style ( FontStyleEnum eTextStyle );

     Parameters
          psText       [out, retval]
          sText        [in]
          A FontStyleEnum variable specifies the watermark text font style.
          Default is FS_Bold.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of FontStyleEnum:
          enum
          {
                  FS_Normal = 0,
                  FS_Bold      = 1,
                  FS_Italic    = 2,
                  FS_BoldItalic= 3
          } FontStyleEnum;




                                                                            186
PDF CMD SDK


IPDFTextWatermark Interface

5. TextColorRed


     Description
           TextColorRed property controls the red portion of text watermark
           color.

     Syntax
           HRESULT get_TextColorRed ( long *psTextColorRed );

            HRESULT put_TextColorRed ( long sTextColorRed );

     Parameters
          psTextColorRed      [out, retval]
          sTextColorRed       [in]
          A long variable specifies the red portion of text watermark color.
          Default is 120.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                               187
PDF CMD SDK


IPDFTextWatermark Interface

6. TextColorGreen


     Description
           TextColorGreen property controls the green portion of text
           watermark color.

     Syntax
           HRESULT get_TextColorGreen ( long *psTextColorGreen );

            HRESULT put_TextColorGreen ( long sTextColorGreen );

     Parameters
          psTextColorGreen [out, retval]
          sTextColorGreen [in]
          A long variable specifies the green portion of text watermark color.
          Default is 120.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            188
PDF CMD SDK


IPDFTextWatermark Interface

7. TextColorBlue


     Description
           TextColorBlue property controls the blue portion of text watermark
           color.

     Syntax
           HRESULT get_TextColorBlue ( long *psTextColorBlue );

            HRESULT put_TextColorBlue ( long sTextColorBlue );

     Parameters
          psTextColorBlue     [out, retval]
          sTextColorBlue      [in]
          A long variable specifies the blue portion of text watermark color.
          Default is 120.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            189
PDF CMD SDK


IPDFTextWatermark Interface

8. OutlineOnly


     Description
           OutlineOnly property controls whether to display the ouline of the
           text only.

     Syntax
           HRESULT get_OutlineOnly ( VARIANT_BOOL *pbOutlineOnly );

            HRESULT put_OutlineOnly ( VARIANT_BOOL bOutlineOnly );

     Parameters
          pbOutlineOnly         [out, retval]
          bOutlineOnly          [in]
          A boolean variable specifies whether to display the ouline of the
          text only. Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                              190
PDF CMD SDK


IPDFTextWatermark Interface

9. LoadSettingFromIni


     Description
           Set text watermark information from ini setting file.

     Syntax
           HRESULT LoadSettingFromIni ( BSTR sIniPath, BSTR sTitle );

     Parameters
          sIniPath
          [in] Specifies ini file path.
          sTitle
          [in] Specifies watermark’s title in ini file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            191
PDF CMD SDK



ix. IPDFImageWatermark

Provide methods to get or set properties of image or PDF watermark.
IPDFImageWatermark is derived from IPDFWatermarkInfo interface and should
be create through CreateImageWatarmark method.




                                                                       192
PDF CMD SDK


IPDFImageWatermark Interface

1. filename


     Description
           filename property controls the full path of the file containing
           contents that is used as watermark.

     Syntax
           HRESULT get_filename ( BSTR *psFileName );

              HRESULT get_filename ( BSTR sFileName );

     Parameters
          psFileName [out, retval]
          sFileName [in]
          A BSTR variable specifies the full path of the file containing
          contents that is used as watermark.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                             193
PDF CMD SDK


IPDFImageWatermark Interface

2. Width


     Description
           Width propert controls the width (in points) of the watermark
           bounding-box that is used to accept the image or PDF watermark.

     Syntax
           HRESULT get_Width ( double *pdWidth );

            HRESULT put_Width ( double dWidth );

     Parameters
          pdWidth      [out, retval]
          dWidth       [in]
          A double variable specifies the width (in points) of the watermark
          bounding-box that is used to accept the image or PDF watermark.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            194
PDF CMD SDK


IPDFImageWatermark Interface

3. Height


     Description
           Height property controls the height (in points) of the watermark
           bounding-box that is used to accept the image or PDF watermark.

     Syntax
           HRESULT get_Height ( double *pdHeight );

            HRESULT put_Height ( double dHeight );

     Parameters
          pdHeight     [out, retval]
          dHeight      [in]
          A double variable specifies the height (in points) of the watermark
          bounding-box that is used to accept the image or PDF watermark.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            195
PDF CMD SDK


IPDFImageWatermark Interface

4. KeepRatio


     Description
           KeepRatio property controls whether to keep the ratio of the image
           or PDF watermark.

     Syntax
           HRESULT get_KeepRaio ( VARIANT_BOOL *pbKeepRatio );

            HRESULT put_KeepRaio ( VARIANT_BOOL bKeepRatio );

     Parameters
          pbKeepRatio         [out, retval]
          bKeepRatio          [in]
          A boolean variable specifies whether to keep the ratio of the image
          or PDF watermark.
                TRUE = Image or PDF watermark is scaled and positioned
          without distortion.
                FALSE = Do not keep the ratio.
          Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            196
PDF CMD SDK


IPDFImageWatermark Interface

5. CoverWholePage


    Description
          CoverWholePage property controls whether to display the
          watermark covering the whole page.

    Syntax
          HRESULT get_CoverWholePage ( VARIANT_BOOL
          *pbCoverWholePage );

           HRESULT put_CoverWholePage ( VARIANT_BOOL
           bCoverWholePage );

    Parameters
         pbCoverWholePage           [out, retval]
         bCoverWholePage            [in]
         A boolean variable specifies whether to display the watermark
         covering the whole page.
                TRUE = Display the watermark covering the whole page.
                FALSE = Do not display the watermark covering the whole
         page.
         Default is FALSE.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           197
PDF CMD SDK


IPDFImageWatermark Interface

6. PageIdentifier


     Description
           PageIdentifier property controls the number of the page used as
           watermark.

     Syntax
           HRESULT get_PageIdentifier ( long *plPageIdendifier );

            HRESULT put_PageIdentifier ( long lPageIdendifier );

     Parameters
          plPageIdendifier    [out, retval]
          lPageIdendifier     [in]
          A long variable specifies the number of the page used as
          watermark. Default is 0.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                             198
PDF CMD SDK


IPDFImageWatermark Interface

7. MarkedAreaOnly


     Description
           MarkedAreaOnly property controls whether to use the mared area
           as watermark only.

     Syntax
           HRESULT get_MarkedAreaOnly ( VARIANT_BOOL
           *pbMarkedAreaOnly );

            HRESULT put_MarkedAreaOnly ( VARIANT_BOOL
            bMarkedAreaOnly );

     Parameters
          pbMarkedAreaOnly [out, retval]
          bMarkedAreaOnly [in]
          A boolean variable specifies whether to use the mared area as
          watermark only.
                 TRUE = Only use the mared area as watermark.
                 FALSE = Use the whole page as watermark – including
          white area.
          Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            199
PDF CMD SDK


IPDFImageWatermark Interface

8. LoadSettingFromIni


     Description
           Set image watermark information from ini setting file.

     Syntax
           HRESULT LoadSettingFromIni ( BSTR sIniPath, BSTR sTitle );

     Parameters
          sIniPath
          [in] Specifies ini file path.
          sTitle
          [in] Specifies watermark’s title in ini file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            200
PDF CMD SDK



x. IPDFCombine

Provide method to concatenate or overlay several PDF files into one PDF file.




                                                                                201
PDF CMD SDK


IPDFCombine Interface

1. AddFile


     Description
           Add the specific file into the list of the files that you want to be
           combined.

     Syntax
           HRESULT AddFile ( BSTR sFileName, BSTR sPassword );

     Parameters
          sFileName
          [in] Full path of the selected PDF file.
          sPassword
          [in] Password of the PDF file, could be NULL.

     Return Values
           S_OK
           The method succeeded.
           S_FALSE
           Failed. File specified by sFileName is not a PDF file.

     Remarks
          The PDF file will not be opened until actual combination is executed,
          such as Concate or Overlay. This method will return S_OK, even if
          the input password for the PDF file is invalid.




                                                                                  202
PDF CMD SDK


IPDFCombine Interface

2. Concate


     Description
           Combine several PDF files into one PDF file.

     Syntax
           HRESULT Concate ( BSTR sTargetFile );

     Parameters
          sTargetFile
          [in] Full path of the resulting PDF file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          You should call AddFile first, before using this method. Four events
          are fired during combination: StartJob, StartDoc, EndDoc, and
          EndJob. If the password input when the PDF file is added is invalid,
          QueryPassword and QueryContinue are also fired.




                                                                            203
PDF CMD SDK


IPDFCombine Interface

3. Overlay


     Description
           Overlay several PDF files into one PDF file.

     Syntax
           HRESULT Overlay ( BSTR sTargetFile );

     Parameters
          sTargetFile
          [in] Full path of the resulting PDF file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          You should call AddFile first, before using this method. In addition,
          MergeOrder, Anchor, and MergeRepeat should be called if needed.
          Four events are fired during combination: StartJob, StartDoc,
          EndDoc, and EndJob. If the password input when the PDF file is
          added is invalid, QueryPassword and QueryContinue are also fired.




                                                                            204
PDF CMD SDK


IPDFCombine Interface

4. IsCombining


     Description
           Whether another combination is in process.

     Syntax
           HRESULT IsCombining ( VARIANT_BOOL *pbIsCombining );

     Parameters
          pbIsCombining
          [out, retval] Whether another combination process is in process.
          TRUE = PDF combination is in process.
          FALSE = No combination is in process.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Application should call this method to verify that no other
          combination is in process before use of Concate or Overlay method.
          Otherwise Concate or Overlay will fail and returen.




                                                                            205
PDF CMD SDK


IPDFCombine Interface

5. StopCombining


     Description
           Stop the progressing combination.

     Syntax
           HRESULT StopCombining ( );

     Parameters
          None

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            206
PDF CMD SDK


IPDFCombine Interface

6. MergeOrder


     Description
           MergeOrder property controls which predefined MergeOrder for
           overlaying is in use

     Syntax
           HRESULT get_MergeOrder ( MergeOrderEnum *peMergeOrder );

            HRESULT put_MergeOrder ( MergeOrderEnum eMergeOrder );

     Parameters
          peMergeOrder          [out, retval]
          eMergeOrder           [in]
          A MergeOrderEnum specifies which predefined MergeOrder for
          overlaying is in use. Default is MO_Background.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of MergeOrderEnum:
          enum {
                  MO_Background = 0,
                  MO_Foreground     =1
          } MergeOrderEnum;




                                                                            207
PDF CMD SDK


IPDFCombine Interface

7. Anchor


     Description
           Anchor property controls which predefined merge rules for
           overlaying is in use.

     Syntax
           HRESULT get_Anchor ( BSTR *psAnchor );

            HRESULT put_Anchor ( BSTR sAnchor );

     Parameters
          psAnchor       [out, retval]
          sAnchor        [in]
          A BSTR variable specifies which predefined merge rules for
          overlaying is in use. Default is “00”.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          For more information, please see “PDF Driver SDK” as a reference.




                                                                            208
PDF CMD SDK


IPDFCombine Interface

8. MergeRepeat


     Description
           MergeRepeat property controls whether to merge pages with same
           page number only.

     Syntax
           HRESULT get_MergeRepeat ( VARIANT_BOOL *pbMergeRepeat );

            HRESULT put_MergeRepeat ( VARIANT_BOOL pbMergeRepeat );

     Parameters
          pbMergeRepeat       [out, retval]
          bMergeRepeat        [in]
          A boolean variable specifies whether to merge pages with same
          page number only.
                 TRUE = The last page of the shorter document will be
          duplicated, and then merge with the pages of the longer document.
                 FALSE = Only merge pages with page number.
          Default is FALSE.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            209
PDF CMD SDK



xi. _IPDFCombineEvents


Through _IPDFCombineEvents interface, application can receive events sent by
COM.




                                                                         210
PDF CMD SDK


_IPDFCombineEvents Interface

1. StartJob


     Description
           Inform the application that file combination starts.

     Syntax
           void StartJob ( );

     Parameters
          None

     Return Values
           None

     Remarks
          Fired by Concate and Overlay.




                                                                  211
PDF CMD SDK


_IPDFCombineEvents Interface

2. StartDoc


     Description
           Inform the application that which PDF file is being processed..

     Syntax
           void StartPage ( BSTR sFileName );

     Parameters
          sFileName
          [in] Full file path name specifies which PDF file is being
          processed.

     Return Values
           None

     Remarks
          None




                                                                             212
PDF CMD SDK


_IPDFCombineEvents Interface

3. EndDoc


    Description
          Inform the application that the specific file has been combined into
          the target PDF file.

    Syntax
          void EndDoc ( void );

    Parameters
         None

    Return Values
          None

    Remarks
         Corresponding file path has been obtained by previous StartDoc.




                                                                           213
PDF CMD SDK


_IPDFCombineEvents Interface

4. EndJob


    Description
          Inform the application, that the file combination has been finished.

    Syntax
          void EndDoc ( );

    Parameters
         None

    Return Values
          None

    Remarks
         Corresponding file path has been obtained by previous StartDoc.




                                                                            214
PDF CMD SDK


_IPDFCombineEvents Interface

5. Abort


     Description
           Inform the application that combination process has been
           terminated.

     Syntax
           void Abort ( );

     Parameters
          None

     Return Values
           None

     Remarks
          When combination process is terminated, COM will send this event,
          except that the process is cancel by the application through
          StopCombining.
          Caution: This event is unsupported right now.




                                                                       215
PDF CMD SDK


_IPDFCombineEvents Interface

6. QueryContinue


     Description
           Query the user whether to Continue.

     Syntax
           VARIANT_BOOL QueryContinue ( BSTR sFileName );

     Parameters
          sFileName
          [in] Full file path name specifies which PDF file is being
          processed.

     Return Values
           TURE
           Skip current PDF file and continue the combination progress.
           FALSE
           Exit current file combination progress.

     Remarks
          If COM fails to open a PDF file, such as invalid password, it will
          send QueryPassword event three times to query the application for
          password. If the given password is still invalid after three times,
          COM will fire this event.




                                                                          216
PDF CMD SDK



xii.   _IPDFQueryPasswordEvents

If COM opens a PDF file with password, it will query the application for the
password through this interface.




                                                                               217
PDF CMD SDK


_IPDFQueryPasswordEvents Interface

1. QueryPassword


       Description
             Query the user for password of the PDF file.

       Syntax
             BSTR QueryPassword ( BSTR sFileName );

       Parameters
            sFileName
            [in] Full file path name specifies which PDF file is being
            processed.

       Return Values
             Password of the PDF file. If NULL returned, COM will stop querying
             the password immediately and return fail.

        Remarks
If returned password is invalid, COM will fire this event three times.




                                                                           218
PDF CMD SDK


_IPDFQueryPasswordEvents Interface

2. PasswordIncorrect


     Description


     Syntax
           void PasswordIncorrect ( BSTR sFileName );

     Parameters
          sFileName
          [in] Full path of the PDF file that is being processed.

     Return Values
           None

     Remarks
          None




                                                                    219
PDF CMD SDK



xiii. IPDFPackage
Provide method to package several PDF files into one PDF file.




                                                                 220
PDF CMD SDK



IPDFPackage Interface

1. AddField


     Description
           Add field title of package.

     Syntax
           HRESULT AddField ( PG_FieldTypeEnum eType, BSTR sName,
           VARIANT_BOOL bShow, long * index );

     Parameters
          eType
          [in] The added Field’s type.
          sName
          [in] The added Field’s name.
          bShow
          [in] Whether the added Field shows.
          index
          [out, retval] Return the field’s index.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          The field of buildin can only be set field name, not be set filed value,
          that field value will auto generate according to package’s files.And
          the field of custom can be set both field name and value.
          Definition of PG_FieldTypeEnum:
          enum {
                  PG_BuildInNameField                 = 0,
                  PG_BuildInDescriptionField          = 1,
                  PG_BuildInSizeField                 = 2,
                  PG_BuildInCreationDateField         = 3,
                  PG_BuildInModDateField              = 4,
                  PG_CustomTextField                  = 5,
                  PG_CustomDateField                  = 6,
                  PG_CustomNumberField                =7
          } PG_FieldTypeEnum;



                                                                             221
PDF CMD SDK


IPDFPackage Interface

2. SetFieldValue


     Description
           Set package’s field value.

     Syntax
           HRESULT SetFieldValue ( long fileIndex, long fieldIndex, VARIANT
           * value );

     Parameters
          fileIndex
          [in] File index.
          fieldIndex
          [in] Field index.
          value
          [in] The value.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          PG_CustomTextField value is of type VT_BSTR.
          PG_CustomDateField value is of type VT_DATE.
          PG_CustomNumberField value is of type VT_I4.




                                                                            222
PDF CMD SDK


IPDFPackage Interface

3. SetSortField


     Description
           Specifies by which field.to sort the files.

     Syntax
           HRESULT SetSortField ( long fieldIndex, VARIANT_BOOL
           bAscending );

     Parameters
          fieldIndex
          [in] Field index.
          bAscending
          [in] Specifies how to sort the files.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            223
PDF CMD SDK


IPDFPackage Interface

4. SetCover


     Description
           Set package’s cover.

     Syntax
           HRESULT SetCover ( BSTR file, BSTR password );

     Parameters
          file
          [in] File to be set as package cover.
          password
          [in] Password of the file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Cover file must be PDF file.




                                                                            224
PDF CMD SDK


IPDFPackage Interface

5. Pack


     Description
           Do package operation.

     Syntax
           HRESULT Pack ( BSTR dest, );

     Parameters
          dest
          [in] The destination file for package.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            225
PDF CMD SDK


IPDFPackage Interface

6. AddFile


     Description
           Add package files.

     Syntax
           HRESULT AddFile ( BSTR file, BSTR name, BSTR desc, long *
           index );

     Parameters
          file
          [in] File to be added.
          name
          [in] The name of the file. This value can be NULL. If not NULL,
          this value will used for buildinName field value.
          desc
          [in] The description of the file. This value can be NULL. If not
          NULL, this value will used for buildinDescription field value.
          index
          [out, retval] Return added file index.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Added file must be PDF file.




                                                                            226
PDF CMD SDK


IPDFPackage Interface

7. ClearFields


     Description
           Clear fields setting.

     Syntax
           HRESULT ClearFields ( void );

     Parameters
          None

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            227
PDF CMD SDK


IPDFPackage Interface

8. ClearFiles


     Description
           Clear files that have been added.

     Syntax
           HRESULT ClearFiles ( void );

     Parameters
          None

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            228
PDF CMD SDK



III.PDFLibrarian
PDFLibrarian component object provides interfaces to index and search indexed
PDF documents.




                                                                          229
PDF CMD SDK



i. IPDFLibrarian
IPDFLibrarian is the default sink interface of PDFLibaraian component object
interface. Provides method to initialize PDFLibrarian component object and
create index/search interfaces.




                                                                               230
PDF CMD SDK



IPDFLibrarian Interface

1. Initialize


      Description
            Initialize the PDFIndex/PDFSearch compenent.

      Syntax
            HRESULT Initialize ( BSTR sn, long reserved );

      Parameters
           sn
           [in] Serial number.
           reserved
           [in] Reserved for Zeon Corporation. Must be set to 0.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             231
PDF CMD SDK


IPDFLibrarian Interface

2. Uninitialize


      Description
            Close the PDFIndex/PDFSearch component.

      Syntax
            HRESULT Uninitialize ( );

      Parameters
           None

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           This method must be called before terminating the application.




                                                                             232
PDF CMD SDK


IPDFLibrarian Interface

3. CreateIndexInterface


     Description
           Create IPDFIndex interface.

     Syntax
           HRESULT CreateIndexInterface (LPDISPATCH *piIndex );

     Parameters
          piIndex
          [out, retval] A pointer to the returned IPDFIndex interface. NULL if
          create fails.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            233
PDF CMD SDK


IPDFLibrarian Interface

4. CreateSearchInterface


     Description
           Create IPDFSearch interface.

     Syntax
           HRESULT CreateSearchInterface (LPDISPATCH *piSearch );

     Parameters
          piSearch
          [out, retval] A pointer to the returned IPDFSearch interface. NULL
          if create fails.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            234
PDF CMD SDK



ii. IPDFIndex
Provides methods to index PDF documents. IPDFIndex interface should be
create through CreateIndexInterface method.




                                                                         235
PDF CMD SDK


IPDFIndex Interface

1. indexTitle


     Description
           indexTitle property controls title of the index.

     Syntax
           HRESULT get_indexTitle ( BSTR *psIndexTitle );

            HRESULT put_indexTitle ( BSTR sIndexTitle );

     Parameters
          psIndexTitle [out, retval]
          sIndexTitle [in]
          A BSTR variable specifies the title of the index.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            236
PDF CMD SDK


IPDFIndex Interface

2. indexDescription


     Description
           indexDescription property controls description of the index.

     Syntax
           HRESULT get_indexDescription ( BSTR *psIndexDescription );

            HRESULT put_indexDescription ( BSTR sIndexDescription );

     Parameters
          psIndexDescription [out, retval]
          sIndexDescription [in]
          A BSTR variable specifies the description of the index.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            237
PDF CMD SDK


IPDFIndex Interface

3. wordFinderVersion


     Description
           wordFinderVersion property controls the version of PDWordFinder.

     Syntax
           HRESULT get_wordFinderVersion ( long *plWordFinderVersion );

            HRESULT put_wordFinderVersion ( long lWordFinderVersion );

     Parameters
          plWordFinderVersion         [out, retval]
          lWordFinderVersion          [in]
          A long variable specifies the vesion of PDWordFinder. Default is 0
          which means no care.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            238
PDF CMD SDK


IPDFIndex Interface

4. AddIncludeFile


     Description
           Add a file or a folder.

     Syntax
           HRESULT AddIncludeFile ( BSTR sFileName, VARIANT_BOOL
           bDirectory );

     Parameters
          sFilename
          [in] Specifies full path of the file or folder.
          bDirectory
          [in] Specifies that sFileName is path of a file or a folder.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            239
PDF CMD SDK


IPDFIndex Interface

5. AddExcludeFile


     Description
           Exclude a file or a folder.

     Syntax
           HRESULT AddExcludeFile ( BSTR sFileName, VARIANT_BOOL
           bDirectory );

     Parameters
          sFilename
          [in] Specifies full path of the file or folder.
          bDirectory
          [in] Specifies that sFileName is path of a file or a folder.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            240
PDF CMD SDK


IPDFIndex Interface

6. AddStopWord


    Description
          Add a StopWord.

    Syntax
          HRESULT AddStopWord ( BSTR sStopWord );

    Parameters
         sStopWord
         [in] Specifies the StopWord string.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           241
PDF CMD SDK


IPDFIndex Interface

7. AddCustomField


     Description
           Add a customized field.

     Syntax
           HRESULT AddCustomField (ZPL_CustomFieldType eType, BSTR
           sFieldName );

     Parameters
          eType
          [in] Specifies the type of the customized field.
          sFieldName
          [in] Name of the customized field.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of ZPL_CustomFieldType:
          enum
          {
                  CFT_CustomStringField = 0,
                  CFT_CustomIntField      = 1,
                  CFT_CustomDateField     =2
          }ZPL_CustomFieldType




                                                                            242
PDF CMD SDK


IPDFIndex Interface

8. GetIncludeFileArray


     Description
           Get the array of the files or folders included.

     Syntax
           HRESULT GetIncludeFileArray ( VARIANT_BOOL bDirectory,
           VARIANT *paFileArray );

     Parameters
          bDirectory
          [in] Specifies the returned array is of files or folders.
          psFileArray
          [out, retval] A pointer to a SafeArray variable of type BSTR
          containing the list of the files or folders included.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            243
PDF CMD SDK


IPDFIndex Interface

9. GetExcludeFileArray


     Description
           Get the array of the files or folders excluded.

     Syntax
           HRESULT GetExcludeFileArray ( VARIANT_BOOL bDirectory,
           VARIANT *paFileArray );

     Parameters
          bDirectory
          [in] Specifies the returned array is of files or folders.
          psFileArray
          [out, retval] A pointer to a SafeArray variable of type BSTR
          containing the list of the files or folders excluded.


     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            244
PDF CMD SDK


IPDFIndex Interface

10.   GetStopWordsArray


      Description
            Get the array of the stop words.

      Syntax
            HRESULT GetStopWordsArray ( VARIANT *paStopWordsArray );

      Parameters
           psStopWordsArray
           [out, retval] A pointer to a SafeArray variable of type BSTR
           containing the list of the stop words.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             245
PDF CMD SDK


IPDFIndex Interface

11.   GetCustomFieldArray


      Description
            Get the array of the customized fields.

      Syntax
            HRESULT GetCustomFieldArray ( ZPL_CustomFieldType eType,
            VARIANT *paCustomFieldArray );

      Parameters
           eType
           [in] Specifies the type of field to retrieve.
           psCustomFieldArray
           [out, retval] A pointer to a SafeArray variable of type BSTR
           containing the list of the customized fields.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             246
PDF CMD SDK


IPDFIndex Interface

12.   LoadIndex


      Description
            Load a index file.

      Syntax
            HRESULT LoadIndex ( BSTR sIndexFilePath, long lFlag );

      Parameters
           sIndexFilePath
           [in] Full path of the index file.
           lFlag
           [in] Specifies the level of information acquired.
           0:All the imofrmation;
           1:Only the index title;
           2:Index title plus include/exclude files/folders.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Application should firstly load the index file, and use
           GetIncludeFileArray, GetExcludeFileArray to get required
           information.




                                                                             247
PDF CMD SDK


IPDFIndex Interface

13.   BuildIndex


      Description
            Build a index file.

      Syntax
            HRESULT BuildIndex ( BSTR sIndexFile );

      Parameters
           sIndexFile
           [in] Full path of the index file.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             248
PDF CMD SDK


IPDFIndex Interface

14.   RebuildIndex


      Description
            Rebuild a index file.

      Syntax
            HRESULT RebuildIndex ( BSTR sIndexFile );

      Parameters
           sIndexFile
           [in] Full path of the index file.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           The difference between BuildIndex and RebuildIndex is:
           BuildIndex: Only changes from that last build are taken into account.
           RebuildIndex: Build all the index.




                                                                             249
PDF CMD SDK


IPDFIndex Interface

15.   PurgeIndex


      Description
            Delete space used by index.

      Syntax
            HRESULT PurgeIndex ( BSTR sIndexFile );

      Parameters
           sIndexFile
           [in] Full path of the index file.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             250
PDF CMD SDK


IPDFIndex Interface

16.   IsBuilding


      Description
            Check whether index building is in process.

      Syntax
            HRESULT IsBuilding ( VARIANT_BOOL *pbBuilding );

      Parameters
           pbBuilding
           [out, retval] A pointer to a VARIANT_BOOL indicates whether
           index building is in process.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             251
PDF CMD SDK


IPDFIndex Interface

17.   AbortBuilding


      Description
            Stop index building.

      Syntax
            HRESULT AbortBuilding ( );

      Parameters
           None

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             252
PDF CMD SDK


IPDFIndex Interface

18.   GetCatalogStatus


      Description
            Get current status.

      Syntax
            HRESULT GetCatalogStatus ( VARIANT *psFilePaht, VARIANT
            *plPageCount, VARIANT *plPageNumber, ZPL_CatalogStatus
            *peStatus );

      Parameters
           psFilePath
           [out, retval] A pointer to a VARIANT variable of type BSTR
           indicates the full path of the PDF file being built.
           plPageCount
           [out, retval] A pointer to a VARIANT variable of type long
           indicates the page number of the PDF file being processed.
           plPgeNumber
           [out, retval] A pointer to a VARIANT variable of type long
           indicates the number of page being processed.
           peStatus
           [out, retval] Return a pointer to a ZPL_CatalogStatus structure
           that indicates the status.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Definition of ZPL_CatalogStatus
           enum {
                   CS_CatalogIdle                      = 0,
                   CS_CatalogReadying                  = 1,
                   CS_CatalogSearchFile                = 2,
                   CS_CatalogReadDocInfo               = 3,
                   CS_CatalogHashing                   = 4,
                   CS_CatalogWriteZpi                  = 5,
                   CS_CatalogWriteUpdateFile           = 6,
                   CS_CatalogWriteMetadataFile         = 7,
                   CS_CatalogWriteInvf                 = 8,


                                                                             253
PDF CMD SDK


      CS_CatalogMergeInvf     = 9,
      CS_CatalogStopping      = 10,
      CS_CatalogCompleted     = 11
} ZPL_CatalogStatus;




                                      254
PDF CMD SDK



iii. IPDFSearch
Provides method to search PDF documents. IPDFSearch interface should be
create through CreateSearchInterface method.




                                                                          255
PDF CMD SDK


IPDFSearch Interface

1. SetOption


     Description
           Set options for searching.

     Syntax
           HRESULT SetOption (ZPL_QueryType eType, VARIANT_BOOL
           bWholeWord, VARIANT_BOOL bCaseSensitive, VARIANT_BOOL
           bStemming, VARIANT_BOOL bQueryBookmark, VARIANT_BOOL
           bQueryComment );

     Parameters
          eType
          [in] Specifies the search type.
          bWholeWord
          [in] Specifies whether to match the whole word.
          bCaseSensitive
          [in] Specifies whether to mach the word case-sensitively.
          bStemming
          [in] Specifies whether to include the etymon.
          bQueryBookmark
          [in] Specifies whether to search the bookmark.
          bQueryComment
          [in] Specifies whether to search the comment.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of ZPL_QueryType:
          enum {
                  SQT_ExactPhrase = 0,
                  SQT_AnyWords = 1,
                  SQT_AllWords = 2,
                  SQT_Boolean = 3
          } ZPL_QueryType;




                                                                            256
PDF CMD SDK


IPDFSearch Interface

2. AddCriteria


     Description
           Add additional criteria.

     Syntax
           HRESULT AddCriteria ( BSTR sKey, ZPL_MetaDataOP eOP,
           BSTR, sValue );

     Parameters
          sKey
          [in] Case-sensitively BSTR value specifies the name of the field,
          predefined or customized.
          Predefined field:
          "Author"<==> MetaData::author
          "Title"<==> MetaData::title
          "Subject"<==> MetaData::subject
          "Keywords"<==> MetaData::keywords
          "Creator"<==> MetaData::creator
          "Producer"<==> MetaData::producer
          "CreationDate"<==> MetaData::dateCreation
          "ModDate"<==> MetaData::dateModified
          eOP
          [in] Specify the operator on the metadata.
          string type supports:
          include“=”
          exclude“!=”
          int and data type support:
          less than“<”
          equal“=”
          unequal“!=”
          greater than“>”
          sValue
          [in] Specify the value of the field.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks


                                                                            257
PDF CMD SDK


Definition of ZPL_MetaDAtaOP:
enum {
        OP_Less          = 0,
        OP_Equal         = 1,
        OP_Include       = 1,
        OP_Unequal       = 2,
        OP_Exclude       = 2,
        OP_More          =3
} ZPL_MetaDataOP;




                                258
PDF CMD SDK


IPDFSearch Interface

3. SearchIndex


     Description
           Search the index file.

     Syntax
           HRESULT SearchIndex ( BSTR sIndexFile, BSTR sPhrase );

     Parameters
          sIndexFile
          [in] Full path of the index file.
          sPhrase
          [in] The phrase to search for.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          FindWordInDoc will be fired during search. Also
          FindWordInBookmark/FindWorkInComment will be fired if
          bookmark/comment was included.




                                                                            259
PDF CMD SDK


IPDFSearch Interface

4. AbortSearching


     Description
           Abort searching.

     Syntax
           HRESULT AbortSearching (VARIANT_BOOL bAbort );

     Parameters
          bAbort
          [in] Whether to abort searching.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            260
PDF CMD SDK



iv. _IPDFSearchEvents
Events that will be fired during search.




                                                261
PDF CMD SDK


_IPDFSearchEvents Interface

1. FindWordInDoc


     Description
           Inform the application that the word has been found in the PDF
           document..

     Syntax
           HRESULT FindWordInDoc ( BSTR sFilename, long lPageNo, long
           lWordNo, long lWordNum, VARIANT_BOOL bModified );

     Parameters
          sFileName
          [in] Full path of the PDF file being searched.
          lPageNo
          [in] Zero-based number of the page being processed.
          lWordNo
          [in] Zero-based number of the word being processed.
          lWordNum
          [in] dscp
          bModified
          [in] Indicates that whether the PDF document has been modified
          since the last build of the index.

     Return Values
           VARIANT_TRUE Continue searching;
           VARIANT_FALSEStop searching.

     Remarks
          If the search result contains only file name, then lPageNo, lWordNo
          and lWordNum are all set to “-1”.




                                                                            262
PDF CMD SDK


_IPDFSearchEvents Interface

2. FindWordInBookmark


    Description
          The word has been found in bookmarks.

    Syntax
          HRESULT FindWordInBookmark ( BSTR sFileName, VARIANT
          aPosition, VARIANT_BOOL bModified );

    Parameters
         sFileName
         [in] Full path of the PDF document.
         sPostion
         [in] A SafeArray variable of type VT_I4
         bModified
         [in] Indicates that whether the PDF document has been modified
         since the last build of the index.

    Return Values
          VARIANT_TRUE Continue searching;
          VARIANT_FALSEStop searching.

    Remarks
         None




                                                                     263
PDF CMD SDK


_IPDFSearchEvents Interface

3. FindWordInComment


    Description
          The word has been found in comments.

    Syntax
          HRESULT FindWordInComment ( BSTR sFileName, long lPageNo,
          long lAnnotationNo, VARIANT_BOOL bModified );

    Parameters
         sFileName
         [in] Full path of the PDF document.
         lPageNo
         [in] Zero-based number of the page.
         jlAnnotationNo
         [in] Zero-based index of the annotation in the page.
         bModified
         [in] Indicates that whether the PDF document has been modified
         since the last build of the index.

    Return Values
          VARIANT_TRUE Continue searching;
          VARIANT_FALSEStop searching.

    Remarks
         None




                                                                     264
PDF CMD SDK


_IPDFSearchEvents Interface

4. StartSearch


     Description
           Search has been started.

     Syntax
           HRESULT StartSearch (VARIANT_BOOL bTrial );

     Parameters
          bTrial
          [in] Whether it is trial version.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            265
PDF CMD SDK



IV.   PDF2Image
PDF2Image component object provides interfaces to convert PDF files to image
files.




                                                                         266
PDF CMD SDK



i. IPDF2Image

IPDF2Image is the default sink interface of PDF2Image component object.
Provides methods to initialize PDF2Image component object and convert PDF
files to image files.




                                                                        267
PDF CMD SDK


IPDF2Image Interface

1. Initialize


      Description
            Initialize the PDF2Image compenent.

      Syntax
            HRESULT Initialize ( BSTR sn, long reserved );

      Parameters
           sn
           [in] Serial number.
           reserved
           [in] Reserved for Zeon Corporation. Must be set to 0.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           PDF2Image must be initialized before invoking its method.




                                                                             268
PDF CMD SDK


IPDF2Image Interface

2. Uninitialize


      Description
            Close the PDF2Image component.

      Syntax
            HRESULT Uninitialize ( );

      Parameters
           None

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           This method must be called before terminating the application.




                                                                             269
PDF CMD SDK


IPDF2Image Interface

3. OpenFile


     Description
           Open a PDF file you want to convert to image file.

     Syntax
           HRESULT OpenFile ( VARIANT sFilePath, BSTR
           sOpenPassword );

     Parameters
          sFilePath
          [in] Full path of the specific PDF file that you want to open.
          sOpenPassword
          [in] Password for opening the PDF file.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            270
PDF CMD SDK


IPDF2Image Interface

4. CloseFile


     Description
           Close the PDF file have been opened.

     Syntax
           HRESULT CloseFile ( );

     Parameters
          None

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            271
PDF CMD SDK


IPDF2Image Interface

5. GetPageCount


    Description
          Get page count of the PDF file that has been opened.

    Syntax
          HRESULT GetPageCount ( long *plNum );

    Parameters
         plNum
         [out, retval]   Reveives page count.

    Return Values
          S_OK
          The method succeeded.
          Others
          Failed, return error information through IErrorInfo Interface.

    Remarks
         None




                                                                           272
PDF CMD SDK


IPDF2Image Interface

6. SetScale


     Description
           Set the scale of Image file.

     Syntax
           HRESULT SetScale ( float scale, long dpi);

     Parameters
          scale
          [in] The scale of the image file you want to set, default is 100.
          dpi
          [in] The dpi of the image file you want to set, default is 96.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          SetScale and SetSize are two different methods to set the size of
          the image, invoke one of them will overwrite another setting.




                                                                              273
PDF CMD SDK


IPDF2Image Interface

7. SetSize


     Description
           Set the size of the Image file.

     Syntax
           HRESULT SetSize ( long width, long height, VARIANT_BOOL
           bKeepRatio );

     Parameters
          width
          [in] Width of the image file you want to set.
          height
          [in] Height of the image file you want to set.
          bkeepRatio
          [in] Whether keep ratio when convert to image file. If it is FALSE,
          the image will fill the whole rectangle,and xscale and yscale will not
          consistent.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          SetScale and SetSize are two different methods to set the size of
          the image, invoke one of them will overwrite another setting.




                                                                            274
PDF CMD SDK


IPDF2Image Interface

8. PrintToBMP


     Description
           Convet the PDF file to BMP file.

     Syntax
           HRESULT PrintToBMP ( long pageno, BSTR imagefile, BPPEnum
           bitsPerPixel, long *pWidth, long *pHeight );

     Parameters
          pageno
          [in] Page no. of the PDF file you want to print to bitmap file.
          imagefile
          [in] Full path of the bitmap file.
          bitsPerPixel
          [in] Set the quality of the HBitmap, have five formats, such as
          1,4,8,16,24, default is BPP_24.
          pWidth
          [out, retval] Return the width of the BMP.
          pHeight
          [out, retval] Return the height of the BMP.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          Definition of BPPEnum:
          enum {
                  BPP_1      = 1,
                  BPP_4      = 4,
                  BPP_8      = 8,
                  BPP_16     = 16,
                  BPP_24     = 24
          } BPPEnum;

            Default is BPP_24.




                                                                            275
PDF CMD SDK


IPDF2Image Interface

9. PrintToJPEG


     Description
           Covert the PDF file to JPEG file.

     Syntax
           HRESULT PrintToJPEG ( long pageno, BSTR imagefile, long
           quality, long *pWidth, long *pHeight );

     Parameters
          pageno
          [in] Page no. of the PDF file you want to print to JPEG file.
          imagefile
          [in] Full path of the JPEG file will be printed.
          quality
          [in] Quality of the JPEG file you want to set, it’s value is between
          1 – 100.
          pWidth
          [out, retval] Return the width of the JPEG.
          pHeight
          [out, retval] Return the height of the JPEG.

     Return Values
           S_OK
           The method succeeded.
           Others
           Failed, return error information through IErrorInfo Interface.

     Remarks
          None




                                                                            276
PDF CMD SDK


IPDF2Image Interface

10.   PrintToJPEG2000


      Description
            Covert the PDF file to JPEG2000 file.

      Syntax
            HRESULT PrintToJPEG2000 ( long pageno, BSTR imagefile, long
            quality, long *pWidth, long *pHeight );

      Parameters
           pageno
           [in] Page no. of the PDF file you want to print to JPEG2000 file.
           imagefile
           [in] Full path of the JPEG2000 file.
           quality
           [in] Quality of the JPEG2000 file you want to set, It’s value is
           between 1-100.
           pWidth
           [out, retval] Return the width of the JPEG2000.
           pHeight
           [out, retval] Return the Height of the JPEG2000.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             277
PDF CMD SDK


IPDF2Image Interface

11.   PrintToTIFF


      Description
            Convert PDF file to TIFF file.

      Syntax
            HRESULT PrintToTIFF ( long pageno, BSTR imgfile,BPPEnum
            bitsPerPixel, TIFFCompressEnum comp_mode, long flag, ong
            *pWidth, long * pHeight );

      Parameters
           pageno
           [in] Page no. of the PDF file you want to print to TIFF file.
           imgfile
           [in] Full path of the TIFF file will be printed.
           bitsPerPixel
           [in] The dpi of the TIFF file, support the format of 1,4,8 and 24.
           comp_mode
           [in] The compress mode that will be used when convert to TIFF
           file.
           flag
           [in] Reserved.
           pWidth
           [out, retval] Return the width of the TIFF file.
           pHeight
           [out, retval] Return the height of the TIFF file.

      Return Values
            None

      Remarks
           If it is color palette format (1,4or 8 bits), image is could not be too
           big , namely scale and dpi could not be set too large.

             Definition of TIFFCompressEnum:
             enum {
                     TIFF_NO_COMPRESS       = 1,
                     TIFF_CCITT_G3          = 3,
                     TIFF_CCITT_G4          = 4,
                     TIFF_LZW               = 5,
                     TIFF_JPEG_24B          = 7,
                     TIFF_ZIP               =8


                                                                                 278
PDF CMD SDK


} TIFFCompressEnum;

Default is TIFF_CCITT_G3.




                               279
PDF CMD SDK


IPDF2Image Interface
12.   PrintToMultiTIFF


      Description
            Convert PDF file to MultiTIFF file.

      Syntax
            HRESULT PrintToMultiTIFF ( BSTR pageRange, BSTR
            imgfile,BPPEnum bitsPerPixel, TIFFCompressEnum comp_mode,
            long flag, long *pWidth, long *pHeight );

      Parameters
           pageRange
           [in] Page range of the PDF file you want to print to MultiTIFF file,
           the same as the pagerange of the watermark and print, (for
           example: 0, 3, 5,-7), when the pageRange if “”, all pages will be
           convert the MultiTIFF file, default is “”.
           imgfile
           [in] Full path of the MultiTIFF file will be printed.
           bitsPerPixe
           [in] The bpi of the MultiTIFF file, support the fomat of 1,4,8 and 24.
           comp_mode
           [in] The compress mode that will be used when convert to
           MultiTIFF file.
           flag
           [in] Reserved.
           pWidth
           [out, retval] Width of the MultiTIFF file.
           pHeight
           [out, retval] Height of the MultiTIFF file.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           The Image is could not be too big, namely the scale and dpi could
           not be set too large.




                                                                             280
PDF CMD SDK


IPDF2Image Interface

13.   PrintToGIF


      Description
            Convert PDF file to 8 bits GIF file.

      Syntax
            HRESULT PrintToGIF ( long pageno, BSTR imgfile, long *pWidth,
            long *pHeight );

      Parameters
           pageno
           [in] Page no. of the PDF file you want to print to GIF file.
           imgfile
           [in] Full path of the image file will be printed.
           pWidth
           [out, retval] Return the width of the GIF file.
           pHeight
           [out, retval] Return the height of the GIF file.

      Return Values
            None

      Remarks
           None




                                                                          281
PDF CMD SDK


IPDF2Image Interface

14.   PrintToHBitmap


      Description
            Convert PDF file to HBitmap file.

      Syntax
            HRESULT PrintToHBitmap ( long pageno, BPPEnum bitsPerPixel,
            long *pHBitmap );

      Parameters
           pageno
           [in] Page no. of the PDF file you want to convert it to HBitmap file.
           bitsPerPixe
           [in] Set the quality of the HBitmap, have five formats, such as
           1,4,8,16,24.
           pHBitmap
           [out, retval] return HBITMAP.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Definition of BPPEnum:
           enum {
                   BPP_1      = 1,
                   BPP_4      = 4,
                   BPP_8      = 8,
                   BBP_16     = 16,
                   BPP_24     = 24
           } BPPEnum;

             Default is BPP_24.




                                                                             282
PDF CMD SDK


IPDF2Image Interface

15.   removeMargin


      Description
            removeMargin propert controls whether to remove the margin of the
            PDF file when convert it to image file.

      Syntax
            HRESULT get_removeMargin ( VARIANT_BOOL *
            pbRemoveMargin );

             HRESULT set_removeMargin ( VARIANT_BOOL
             bRemoveMargin );

      Parameters
           pbRemoveMargin [out, retval]
           bRemoveMargin       [in]
           A boolean variable specifies whether to remove the margin of the
           PDF file when convert it to image file.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           None




                                                                             283
PDF CMD SDK


IPDF2Image Interface

16.   rotation


      Description
            rotation property controls the rotation of image file compare to the
            PDF file.

      Syntax
            HRESULT get_rotation ( RotationEnum *peRotation );

             HRESULT put_rotation ( RotationEnum eRotation );

      Parameters
           peRotation [out, retval]
           eRotation   [in]
           A RotationEnum variable specifies rotation angle of the image file
           compare with the PDF file. Default is Rotate_0.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Definition of RotationEnum:
           enum {
                   Rotate_0          = 0,
                   Rotate_90         = 90,
                   Rotate_180        = 180,
                   Rotate_270        = 270,
                   Rotate_Neg_90     = -90,
                   Rotate_Neg_180 = -180,
                   Rotate_Neg_270 = -270
           } RotationEnum;




                                                                              284
PDF CMD SDK


IPDF2Image Interface

17.   content


      Description
            content propert controls what content of the PDF file will be print to
            image file.

      Syntax
            HRESULT get_content (PrintContentEnum *pPrintContent );

             HRESULT get_content (PrintContentEnum PrintContent );

      Parameters
           pPrintContent           [out, retval]
           PrintContent            [in]
           A PrintContentEnum variable specifies which contents of the PDF
           file will be printed to image file. Default is PC_ContentAndForm.

      Return Values
            S_OK
            The method succeeded.
            Others
            Failed, return error information through IErrorInfo Interface.

      Remarks
           Definition of PrintContentEnum:
           enum {
                   PC_ContentAndForm       = 0,
                   PC_ContentOnly          = 1,
                   PC_FormOnly             =2
           } PrintContentEnum;




                                                                               285
PDF CMD SDK



ii. _IPDF2ImageEvents
Events that will be fired when opening a PDF file with password.




                                                                   286
PDF CMD SDK


_IPDF2ImageEvents Interface

1. QueryPassword


    Description
          Query the user for password of the PDF file.

    Syntax
          BSTR QueryPassword ( BSTR sFileName );

    Parameters
         sFileName
         [in] Full file path name specifies which PDF file is being
         processed.

    Return Values
          Password of the PDF file. If NULL returned, COM will stop querying
          the password immediately and return fail.

    Remarks
         If returned password is invalid, COM will fire this event three times.




                                                                            287
PDF CMD SDK


_IPDF2ImageEvents Interface

2. PasswordIncorrect


     Description


     Syntax
           void PasswordIncorrect ( BSTR sFileName );

     Parameters
          sFileName
          [in] Full path of the PDF file that is being processed.

     Return Values
           None

     Remarks
          None




                                                                    288
PDF CMD SDK



 Index of Method
Abort ...................................................................................................................42
AbortBuilding ....................................................................................................252
AbortSearching .................................................................................................260
AddCriteria........................................................................................................257
AddCustomDocInfo...................................................................................120, 121
AddCustomField ...............................................................................................242
AddExcludeFile .................................................................................................240
AddField....................................................................................................221, 222
AddFile......................................................................................................202, 226
AddIncludeFile ..................................................................................................239
AddPDFMark ....................................................................................................107
AddStopWord ...................................................................................................241
AddWatermark..................................................................................................179
AlwaysEmbedCount............................................................................................79
AlwaysEmbedFontName ....................................................................................80
Anchor ......................................................................................................163, 208
Angle.................................................................................................................172
Author ...............................................................................................................117
AutoBookmark ....................................................................................................85
AutoComment .....................................................................................................91
AutoCompression ...............................................................................................57
AutoCompressionRate........................................................................................58
Avort .................................................................................................................215
Background.......................................................................................................174
Binding..............................................................................................................168
BuildIndex .........................................................................................................248
canContentAccessForVisuallyImpaired ............................................................133
canContentCopyAndExtraction .........................................................................132
canCopy............................................................................................................130
canModify .........................................................................................................131
canPrint.....................................................................................................128, 129
changesAllowed................................................................................................135
Clearence .........................................................................................................169
ClearFields........................................................................................................227
ClearFiles..........................................................................................................228
Close.........................................................................................................104, 160
CloseFile...........................................................................................................271
ColorCompressMethod .......................................................................................60
ColorReSampleMethod.......................................................................................62
ColorReSampleResolution..................................................................................63
Compatible....................................................................................................53, 99
CompressColor ...................................................................................................59
CompressGray....................................................................................................64


                                                                                                                     289
PDF CMD SDK


CompressMono...................................................................................................69
Concate ............................................................................................................203
content ..............................................................................................................285
Convert ...............................................................................................................24
ConvertTextBox ..................................................................................................90
ConvertWithIni ....................................................................................................29
CoverWholePage..............................................................................................197
CreateCombineInterface.....................................................................................97
CreateFileEditInterface .......................................................................................96
CreateImageWatermark....................................................................................109
CreateIndexInterface ........................................................................................233
CreateNewPage................................................................................................153
CreatePackageInterface .....................................................................................98
CreatePageEditInterface...................................................................................106
CreateSearchInterface......................................................................................234
CreateTextWatermark.......................................................................................108
Creator..............................................................................................................122
Crop ..................................................................................................................158
CrossPageWatermark.......................................................................................167
Delete ...............................................................................................................156
DoCrossDocuLink ...............................................................................................88
DoCrossRefLink..................................................................................................89
DoInternetLink.....................................................................................................87
DoNote................................................................................................................86
Duplex...............................................................................................................171
EmbedAllFonts....................................................................................................75
EnableAlwaysEmbed ..........................................................................................78
EnableNeverEmbed............................................................................................81
encryptionLevel.................................................................................................134
EndDoc .......................................................................................................41, 213
EndJob..............................................................................................................214
EndPage .............................................................................................................40
EvenOdd...........................................................................................................178
filename ............................................................................................................193
FindWordInBookmark .......................................................................................263
FindWordInComment........................................................................................264
FindWordInDoc.................................................................................................262
GetCatalogStatus..............................................................................................253
GetCompressionSettingInterface ........................................................................32
GetCustomDocInfo ...........................................................................................119
GetCustomDocInfoCount..................................................................................118
GetCustomFieldsArray......................................................................................246
GetDocInfoInterface..........................................................................................110
GetExcludeFileArray .........................................................................................244
GetFontEmbedSettingInterface...........................................................................33
GetGeneralSettingInterface ................................................................................31



                                                                                                                    290
PDF CMD SDK


GetIncludeFileArray ..........................................................................................243
GetOpenOptionInterface...................................................................................112
GetPageBitmap.................................................................................................161
GetPageCount ..................................................................................................272
GetPageNum ....................................................................................................105
GetPageWidthHeight ........................................................................................155
GetSecurityInterface .........................................................................................111
GetStopWordsArray..........................................................................................245
GetVolumeLeft ....................................................................................................36
GetVolumeLimit ..................................................................................................35
GetWordMacroSettingInterface...........................................................................34
GrayCompressMethod........................................................................................65
GrayReSampleMethod .......................................................................................67
GrayReSampleResolution ..................................................................................68
Height .........................................................................................................49, 195
HideControl.......................................................................................................149
HideMeunbar ....................................................................................................148
HideToolbar ......................................................................................................147
indexDescription ...............................................................................................237
indexTitle ..........................................................................................................236
Initialize............................................................................................... 94, 231, 268
Initialize...............................................................................................................21
InitialPage .........................................................................................................143
InitialWindow.....................................................................................................145
Insert.................................................................................................................159
IsBuilding ..........................................................................................................251
IsCombining......................................................................................................205
IsFileTypeSupported...........................................................................................23
KeepRatio .........................................................................................................196
Keyword............................................................................................................116
Layout ...............................................................................................................144
LoadDocInfoSettingFromIni ..............................................................................124
LoadIndex .........................................................................................................247
LoadOpenSettingFromIni..................................................................................151
LoadSecuritySettingFromIni..............................................................................139
LoadSettingFromIni...................................................................................191, 200
Magnification.....................................................................................................142
Margin.................................................................................................................47
MarkedAreaOnly ...............................................................................................199
MergeOrder ......................................................................................................207
MergeRepeat ....................................................................................................209
MonoCompressMethod.......................................................................................70
MonoReSampleMethod ......................................................................................72
MonoReSampleResolution .................................................................................73
NavigationPane.................................................................................................146
NeverEmbedCount .............................................................................................82



                                                                                                                     291
PDF CMD SDK


NeverEmbedFontName ......................................................................................83
NewPDF ...........................................................................................................102
Opacity..............................................................................................................173
Open .........................................................................................................101, 154
open_password.................................................................................................126
OpenFile ...........................................................................................................270
OptimizePDF ......................................................................................................55
Orientation ..........................................................................................................50
OutlineOnly .......................................................................................................190
Overlay .............................................................................................................204
owner_password...............................................................................................127
Pack..................................................................................................................225
PageIdentifier....................................................................................................198
PageRange.......................................................................................................177
PasswordIncorrect ....................................................................................219, 288
PirntToTIFF.......................................................................................................278
Position .............................................................................................................170
printingAllowed..................................................................................................136
PrintToBMP ......................................................................................................275
PrintToGIF ........................................................................................................281
PrintToHBitmap.................................................................................................282
PrintToJPEG.....................................................................................................276
PrintToJPEG2000 .............................................................................................277
PrintToMultiTIFF ...............................................................................................280
Producer ...........................................................................................................123
PurgeIndex .......................................................................................................250
QueryContinue..................................................................................................216
QueryPassword ........................................................................................218, 287
RebuildIndex.....................................................................................................249
Redo .................................................................................................................180
removeMargin ...................................................................................................283
RemoveSecurity................................................................................................138
RemoveSecurityWithPassword.........................................................................140
ReSampleColor...................................................................................................61
ReSampleGray ...................................................................................................66
ReSampleMono ..................................................................................................71
Resolution...........................................................................................................51
RestoreDefaultSettings .......................................................................................26
Rotate ...............................................................................................................157
rotation..............................................................................................................284
Save..................................................................................................................103
Scale...................................................................................................................52
SearchIndex......................................................................................................259
SetCover...........................................................................................................224
SetExcelSHeetRange .........................................................................................28
SetOption..........................................................................................................256



                                                                                                                    292
PDF CMD SDK


SetScale ...........................................................................................................273
SetSecurity .......................................................................................................137
SetSize .............................................................................................................274
SetSortField ......................................................................................................223
SetTimeOut.........................................................................................................27
ShowDocumentTitle..........................................................................................150
ShowOnPrint.....................................................................................................176
ShowOnScreen.................................................................................................175
StandardPageSize ..............................................................................................45
StartDoc......................................................................................................38, 212
StartJob ............................................................................................................211
StartPage............................................................................................................39
StartSearch.......................................................................................................265
StopCombining .................................................................................................206
StopCreating.......................................................................................................25
Subject..............................................................................................................115
SubsetFont .........................................................................................................76
SubsetThreshold.................................................................................................77
Text...................................................................................................................183
TextColorBlue ...................................................................................................189
TextColorGreen ................................................................................................188
TextColorRed....................................................................................................187
TextFont............................................................................................................184
TextSize............................................................................................................185
TextStyle...........................................................................................................186
Title ...................................................................................................................114
Undo .................................................................................................................181
Uninitialize .................................................................................... 22, 95, 232, 269
Unit .............................................................................................................46, 164
UseCustomPageSize..........................................................................................44
ViewPDF.............................................................................................................54
Width...........................................................................................................48, 194
wordFinderVersion............................................................................................238
XOffset..............................................................................................................165
YOffset..............................................................................................................166




                                                                                                                      293
PDF CMD SDK


                                    Copyright


2005- 2008, Zeon Corporation. All rights reserved.

No part of this publication, as well as the software described in it, may be
reproduced,
stored, or transmitted, in any form or by any means, electronic, mechanical,
photocopying,
recording, or otherwise, without the prior written consent of the publisher. The
copyrighted
software that accompanies this publication is licensed to the End User for use
only in strict
accordance with the End User License Agreement.

Microsoft, MS-DOS and Windows are registered trademarks and ActiveX;
Windows NT are
trademarks of Microsoft Corporation in the U.S. and other countries. Apple,
Macintosh and
QuickTime are registered trademarks and TrueType is trademark of Apple
Computer, Inc.
Adobe, Acrobat and PostScript are trademarks of Adobe Systems Inc. Lotus
Notes is a
registered trademark of Lotus Development Corporation. Netscape and Netscape
Navigator are trademarks of Netscape Communications Corporation. UNIX is a
registered
trademark in the U.S. and other countries, licensed exclusively through X/Open
Company,
Ltd. Pentium is a trademark of Intel Corporation. Other brand and product names
are
trademarks or registered trademarks of their respective holders.

Zeon, DocuCom, PDF Reader (DocuReader), PDF Plus (DocuPlus), PDF Librarian
(DocuShelf), PDF RIP, PDF Driver, PDF Office, Go PDFit, PDF Converter,
PDFSHELL and
their logos are trademarks of Zeon Corporation or its subsidiaries and may be
registered in
certain jurisdictions.

This publication is furnished AS IS, is subject to change without notice, and
should not be


                                                                                 294
PDF CMD SDK


construed as a commitment by Zeon Corporation. Zeon Corporation makes no
warranty of
any kind with respect to this publication, and expressly disclaims any and all
warranties of
fitness for particular purposes and non-infringement of third party rights.


Visit us at:
     http://www.pdfwizard.com
For help:
   http://www.pdfwizard.com/eng/qa/onlinesupport.aspx




                                                                                 295

More Related Content

PDF
Hibernate Reference
PDF
Hibernate reference
PDF
Hibernate Reference
PDF
Spring Reference
PDF
Postgresql 8.4.0-us
PDF
Seam reference
PDF
293 Tips For Producing And Managing Flash Based E Learning Content
PDF
Learn python the right way
Hibernate Reference
Hibernate reference
Hibernate Reference
Spring Reference
Postgresql 8.4.0-us
Seam reference
293 Tips For Producing And Managing Flash Based E Learning Content
Learn python the right way

What's hot (20)

PDF
Load runner generator
PDF
Seam reference guide
PDF
R Ints
PDF
E views 6 users guide i
PDF
Asterisk 13-reference
PDF
Drools expert-docs
PDF
Guía de administración de Asterisk
PDF
Cinelerra Video Editing Manual
PDF
Red hat enterprise_linux-7-system_administrators_guide-en-us
PDF
Castor Reference Guide 1 3 1
PDF
The road-to-learn-react
PDF
Tortoise svn 1.7-en
PDF
Spec
PDF
Introduction to system_administration
PDF
J series-chassis-cluster-setup
PDF
Odoo development
PDF
RHEL-7 Administrator Guide for RedHat 7
PDF
E views 9 command ref
PDF
Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...
PDF
Javanotes6 linked
Load runner generator
Seam reference guide
R Ints
E views 6 users guide i
Asterisk 13-reference
Drools expert-docs
Guía de administración de Asterisk
Cinelerra Video Editing Manual
Red hat enterprise_linux-7-system_administrators_guide-en-us
Castor Reference Guide 1 3 1
The road-to-learn-react
Tortoise svn 1.7-en
Spec
Introduction to system_administration
J series-chassis-cluster-setup
Odoo development
RHEL-7 Administrator Guide for RedHat 7
E views 9 command ref
Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...
Javanotes6 linked
Ad

Similar to Cmd (20)

PDF
Cs5 5-final-print-guide
PDF
Better PDFs with FrameMaker-to-Acrobat TimeSavers
PDF
Adobe Best Practice
PPTX
Adobe pagemaker
PDF
PDF
8 channels, future to past future http://awaren.us/H3Wrzw
PDF
PDF
PDF
Scheduled for SS alone!
PDF
PDF
helpmegetjackback
PDF
PDF
Manual smart notebook se mac
PDF
SHARP Document Management
PDF
Thu nghiem
PPT
Using Adobe Acrobat 7
PPT
Using Adobe Acrobat 7 2
PPT
Perfect pdf sample
PDF
Microsoft word handout
PPS
Paperless shop floor 01
Cs5 5-final-print-guide
Better PDFs with FrameMaker-to-Acrobat TimeSavers
Adobe Best Practice
Adobe pagemaker
8 channels, future to past future http://awaren.us/H3Wrzw
Scheduled for SS alone!
helpmegetjackback
Manual smart notebook se mac
SHARP Document Management
Thu nghiem
Using Adobe Acrobat 7
Using Adobe Acrobat 7 2
Perfect pdf sample
Microsoft word handout
Paperless shop floor 01
Ad

Cmd

  • 1. PDF CMD SDK PDF CMD SDK Version: PDF Server 9 Zeon Corporation 2008 http://www.pdfwizard.com http://www.zeon.com.tw 1
  • 2. PDF CMD SDK  Table of Content I. System architecture......................................................................................9 II. Interface Hierarchy .....................................................................................10 I. Convert other document formats to PDF ....................................................13 II. Control conversion settings ........................................................................14 III. Combine multiple PDF documents into one PDF file..................................15 IV. Set security option ......................................................................................16 V. Error handling .............................................................................................17 I. PDFCreate..................................................................................................19 i. IPDFCreate ..................................................................................20 1. Initialize................................................................................21 2. Uninitialize ...........................................................................22 3. IsFileTypeSupported............................................................23 4. Convert ................................................................................24 5. StopCreating........................................................................25 6. RestoreDefaultSettings........................................................26 7. SetTimeOut .........................................................................27 8. SetExcelSheetRange...........................................................28 9. ConvertWithIni .....................................................................29 10. GetGeneralSettingInterface .................................................31 11. GetCompressionSettingInterface.........................................32 12. GetFontEmbedSettingInterface ...........................................33 13. GetWordMacroSettingInterface ...........................................34 14. GetVolumeLimit ...................................................................35 15. GetVolumeLeft.....................................................................36 ii. _IPDFCreateEvents .....................................................................37 1. StartDoc...............................................................................38 2. StartPage.............................................................................39 3. EndPage..............................................................................40 4. EndDoc................................................................................41 5. Abort ....................................................................................42 iii. IPDFGeneralSetting .....................................................................43 1. UseCustomPageSize...........................................................44 2. StandardPageSize...............................................................45 3. Unit ......................................................................................46 4. Margin..................................................................................47 5. Width ...................................................................................48 6. Height ..................................................................................49 7. Orientation ...........................................................................50 8. Resolution............................................................................51 9. ZoomScale ..........................................................................52 10. Compatible ..........................................................................53 11. ViewPDF..............................................................................54 12. OptimizePDF .......................................................................55 2
  • 3. PDF CMD SDK iv. IPDFCompressionSetting.............................................................56 1. AutoCompression ................................................................57 2. AutoCompressionRate.........................................................58 3. CompressColor....................................................................59 4. ColorCompressMethod........................................................60 5. ReSampleColor ...................................................................61 6. ColorReSampleMethod .......................................................62 7. ColorReSampleResolution ..................................................63 8. CompressGray ....................................................................64 9. GrayCompressMethod.........................................................65 10. ReSampleGray ....................................................................66 11. GrayReSampleMethod ........................................................67 12. GrayReSampleResolution ...................................................68 13. CompressMono ...................................................................69 14. MonoCompressMethod .......................................................70 15. ReSampleMono...................................................................71 16. MonoReSampleMethod .......................................................72 17. MonoReSampleResolution ..................................................73 v. IPDFFontEmbedSetting ...............................................................74 1. EmbedAllFonts ....................................................................75 2. SubsetFont ..........................................................................76 3. SubsetThreshold .................................................................77 4. EnableAlwaysEmbed...........................................................78 5. AlwaysEmbedCount ............................................................79 6. AlwaysEmbedFontName .....................................................80 7. EnableNeverEmbed.............................................................81 8. NeverEmbedCount ..............................................................82 9. NeverEmbedFontName .......................................................83 vi. IWordMacroSetting ......................................................................84 1. AutoBookmark .....................................................................85 2. DoNote ................................................................................86 3. DoInternetLink .....................................................................87 4. DoCrossDocuLink................................................................88 5. DoCrossRefLink ..................................................................89 6. ConvertTextBox...................................................................90 7. AutoComment......................................................................91 II. PDFCmd.....................................................................................................92 i. IPDFCmd .....................................................................................93 1. Initialize................................................................................94 2. Uninitialize ...........................................................................95 3. CreateFileEditInterface ........................................................96 4. CreateCombineInterface......................................................97 5. CreatePackageInterface ......................................................98 6. Compatible ..........................................................................99 ii. IPDFFileEdit ...............................................................................100 1. Open..................................................................................101 3
  • 4. PDF CMD SDK 2. NewPDF ............................................................................102 3. Save ..................................................................................103 4. Close .................................................................................104 5. GetPageNum.....................................................................105 6. CreatePageEditInterface ...................................................106 7. AddPDFMark .....................................................................107 8. CreateTextWatermark .......................................................108 9. CreateImageWatermark ....................................................109 10. GetDocInfoInterface...........................................................110 11. GetSecurityInterface ..........................................................111 12. GetOpenOptionInterface....................................................112 iii. IPDFDocInfoSetting ...................................................................113 1. Title....................................................................................114 2. Subject...............................................................................115 3. Keyword.............................................................................116 4. Author ................................................................................117 5. GetCustomDocInfoCount...................................................118 6. GetCustomDocInfo ............................................................119 7. AddCustomDocInfo............................................................120 8. DeleteCustomDocInfo........................................................121 9. Creator...............................................................................122 10. Producer ............................................................................123 11. LoadDocInfoSettingFromIni ...............................................124 iv. IPDFSecuritySetting...................................................................125 1. open_password .................................................................126 2. owner_password ...............................................................127 3. canPrint .............................................................................128 4. canAnnotate ......................................................................129 5. canCopy ............................................................................130 6. canModify ..........................................................................131 7. canContentCopyAndExtraction..........................................132 8. canContentAccessForVisuallyImpaired .............................133 9. encryptionLevel .................................................................134 10. changesAllowed ................................................................135 11. printingAllowed ..................................................................136 12. SetSecurity ........................................................................137 13. RemoveSecurity ................................................................138 14. LoadSecuritySettingFromIni ..............................................139 15. RemoveSecurityWithPassword .........................................140 v. IPDFOpenOptionSetting ............................................................141 1. Magnification .....................................................................142 2. InitialPage..........................................................................143 3. Layout................................................................................144 4. InitialWindow .....................................................................145 5. NavigationPane .................................................................146 6. HideToolbar .......................................................................147 4
  • 5. PDF CMD SDK 7. HideMenubar .....................................................................148 8. HideControl........................................................................149 9. ShowDocumentTitle...........................................................150 10. LoadOpenSettingFromIni...................................................151 vi. IPDFPageEdit ............................................................................152 1. CreateNewPage ................................................................153 2. Open..................................................................................154 3. GetPageWidthHeight .........................................................155 4. Delete ................................................................................156 5. Rotate ................................................................................157 6. Crop...................................................................................158 7. Insert..................................................................................159 8. Close .................................................................................160 9. GetPageBitmap .................................................................161 vii. IPDFWatermarkInfo ...................................................................162 1. Anchor ...............................................................................163 2. Unit ....................................................................................164 3. XOffset...............................................................................165 4. YOffset...............................................................................166 5. CrossPageWatermark .......................................................167 6. Binding...............................................................................168 7. Clearence ..........................................................................169 8. Position..............................................................................170 9. Duplex ...............................................................................171 10. Angle .................................................................................172 11. Opacity ..............................................................................173 12. Background .......................................................................174 13. ShowOnScreen .................................................................175 14. ShowOnPrint .....................................................................176 15. PageRange........................................................................177 16. EvenOdd............................................................................178 17. AddWatermark...................................................................179 18. Redo ..................................................................................180 19. Undo ..................................................................................181 viii. IPDFTextWatermark ..................................................................182 1. Text....................................................................................183 2. TextFont ............................................................................184 3. TextSize.............................................................................185 4. TextStyle............................................................................186 5. TextColorRed ....................................................................187 6. TextColorGreen .................................................................188 7. TextColorBlue....................................................................189 8. OutlineOnly........................................................................190 9. LoadSettingFromIni ...........................................................191 ix. IPDFImageWatermark ...............................................................192 1. filename .............................................................................193 5
  • 6. PDF CMD SDK 2. Width .................................................................................194 3. Height ................................................................................195 4. KeepRatio..........................................................................196 5. CoverWholePage ..............................................................197 6. PageIdentifier ....................................................................198 7. MarkedAreaOnly................................................................199 8. LoadSettingFromIni ...........................................................200 x. IPDFCombine.............................................................................201 1. AddFile ..............................................................................202 2. Concate .............................................................................203 3. Overlay ..............................................................................204 4. IsCombining.......................................................................205 5. StopCombining ..................................................................206 6. MergeOrder .......................................................................207 7. Anchor ...............................................................................208 8. MergeRepeat.....................................................................209 xi. _IPDFCombineEvents................................................................210 1. StartJob .............................................................................211 2. StartDoc.............................................................................212 3. EndDoc..............................................................................213 4. EndJob ..............................................................................214 5. Abort ..................................................................................215 6. QueryContinue ..................................................................216 xii. _IPDFQueryPasswordEvents ....................................................217 1. QueryPassword .................................................................218 2. PasswordIncorrect .............................................................219 xiii. IPDFPackage .............................................................................220 1. AddField ............................................................................221 2. SetFieldValue ....................................................................222 3. SetSortField.......................................................................223 4. SetCover............................................................................224 5. Pack...................................................................................225 6. AddFile ..............................................................................226 7. ClearFields ........................................................................227 8. ClearFiles ..........................................................................228 III. PDFLibrarian ............................................................................................229 i. IPDFLibrarian .............................................................................230 1. Initialize..............................................................................231 2. Uninitialize .........................................................................232 3. CreateIndexInterface .........................................................233 4. CreateSearchInterface.......................................................234 ii. IPDFIndex ..................................................................................235 1. indexTitle ...........................................................................236 2. indexDescription ................................................................237 3. wordFinderVersion.............................................................238 4. AddIncludeFile...................................................................239 6
  • 7. PDF CMD SDK 5. AddExcludeFile..................................................................240 6. AddStopWord ....................................................................241 7. AddCustomField ................................................................242 8. GetIncludeFileArray...........................................................243 9. GetExcludeFileArray..........................................................244 10. GetStopWordsArray...........................................................245 11. GetCustomFieldArray ........................................................246 12. LoadIndex..........................................................................247 13. BuildIndex..........................................................................248 14. RebuildIndex......................................................................249 15. PurgeIndex ........................................................................250 16. IsBuilding ...........................................................................251 17. AbortBuilding .....................................................................252 18. GetCatalogStatus ..............................................................253 iii. IPDFSearch ...............................................................................255 1. SetOption...........................................................................256 2. AddCriteria.........................................................................257 3. SearchIndex ......................................................................259 4. AbortSearching..................................................................260 iv. _IPDFSearchEvents...................................................................261 1. FindWordInDoc..................................................................262 2. FindWordInBookmark ........................................................263 3. FindWordInComment.........................................................264 4. StartSearch........................................................................265 IV. PDF2Image ..............................................................................................266 i. IPDF2Image ...............................................................................267 1. Initialize..............................................................................268 2. Uninitialize .........................................................................269 3. OpenFile ............................................................................270 4. CloseFile............................................................................271 5. GetPageCount...................................................................272 6. SetScale ............................................................................273 7. SetSize ..............................................................................274 8. PrintToBMP .......................................................................275 9. PrintToJPEG......................................................................276 10. PrintToJPEG2000..............................................................277 11. PrintToTIFF .......................................................................278 12. PrintToMultiTIFF................................................................280 13. PrintToGIF .........................................................................281 14. PrintToHBitmap .................................................................282 15. removeMargin....................................................................283 16. rotation...............................................................................284 17. content...............................................................................285 ii. _IPDF2ImageEvents ..................................................................286 1. QueryPassword .................................................................287 2. PasswordIncorrect .............................................................288 7
  • 8. PDF CMD SDK  Overview PDF CMD is a set of component objects providing COM interfaces to convert — from other document formats to PDF; modify — edit document properties, manipulate pages; secure — set security option; combine — concatenate or overlay; annotate — add watermark; search — index and search PDF documents. All the DocuCom series products including the PDF Gold, PDF Driver, Watch Folder and PDF Server Console/Client are based on the same underlayer application programming interfaces of PDF CMD. See system architecture for detail. 8
  • 9. PDF CMD SDK I. System architecture Diagram of system architecture PDF Gold PDF Driver Watchfolder PDFReader OCX Applications PDF Server Console / Client PDF CMD ... File Image2PDF Create Doc Mark Index PDF API Abstraction Layer Tag Package Digital Signature Security Stamp Imposition Watermark XFDF Combine ... DocuCom PDF DAB DD DDE DDS DU ... Core Library On the ground, there is Zeon’s elite DocuCom PDF Core Library. Provides complete PDF specifications support via industry standard interface syntax. Then there is a middle PDF API abstraction layer. By offering application friendly format APIs, the middle layer greatly simplifies the task of PDF document processing. And finally we have the application layer, including PDF CMD of course. Essentially, PDF CMD is the COM interface wapper of the underlay PDF API. 9
  • 10. PDF CMD SDK II. Interface Hierarchy 10
  • 11. PDF CMD SDK IPDFGeneralSetting IPDFCompressionSetting IPDFCreate IPDFCompressionSetting PDFCreate IPDFWordMacroSetting _IPDFCreateEvents IPDFDocInfoSetting IPDFSecuritySetting IPDFOpenOptionSetting IPDFFileEdit IPDFPageEdit IPDFCmd IPDFTextWatermark PDFCmd IPDFImageWatermark IPDFCombine IPDFPackage _IPDFCombineEvents _IPDFQueryPasswordEvents IPDFIndex IPDFLibrarian PDFLibrarian IPDFSearch _IPDFSearchEvents IPDF2Image PDF2Image _IPDF2ImageEvents 11
  • 12. PDF CMD SDK  Programming Guide Since PDF CMD provides standard COM interfaces, it should be compatible to any programming languages that support COM, including scripting languages. Though PDF CMD COM interfaces are language independent, we use C++ syntax for instructions and descriptions in this document. A typical usage of PDF CMD includes following procedure: 1. Initialize COM; 2. Create instances of COM classes and initialize; 3. Retrieve interfaces and do your work; 4. Uninitialize and clean up. 12
  • 13. PDF CMD SDK I. Convert other document formats to PDF The most common usage of PDF CMD is to create PDF from other document formats. Basically, it is done by utilizing Convert method of IPDFCreate interface. 1. Create IPDFCreate interface, which is the default sink interface of PDFCreate component object; 2. Call Initialize method to initialize PDFCreate component object; 3. Use Convert method to create PDF from source file; 4. Call Uninitialize method and release the IPDFCreate interface. 13
  • 14. PDF CMD SDK II. Control conversion settings Various settings during conversion can be configed, through IPDFGeneralSetting, IPDFCompressionSetting,and IPDFFontEmbedSetting. To modify conversion settings: 1. Create IPDFCreate interface, which is the default sink interface of PDFCreate component object; 2. Call Initialize method to initialize PDFCreate component object; 3. Use GetGeneralSettingInterface, GetCompressionSettingInterface, or GetFontEmbedSettingInterface to retrieve corresponding interfaces; 4. Modify conversion settings using the returned interfaces; 5. Do conversion jobs; 6. Call Uninitialize method and release the IPDFCreate interface. 14
  • 15. PDF CMD SDK III.Combine multiple PDF documents into one PDF file IPDFCombine interface is used to concatenate or overlay multiple PDF documents into one PDF file. 1. Create IPDFCmd interface, which is the defatult sink interface of PDFCmd component object; 2. Call Initialize method to initialize PDFCmd component object; 3. Use CreateCombineInterface method to create IPDFCombine interface; 4. Include files you want to combine through AddFile method; 5. Call Concate or Overlay to do the job; 6. Release the created IPDFCombine interface; 7. Uninitialize and release the IPDFCmd interface. 15
  • 16. PDF CMD SDK IV. Set security option Security options are control through IPDFSecuritySetting interface. Basic procedure includes create IPDFEditEdit interface, open target PDF file,and retrieve IPDFSecuritySetting interface. 1. Create IPDFCmd interface, which is the defatult sink interface of PDFCmd component object; 2. Call Initialize method to initialize PDFCmd component object; 3. Use CreateFileEditInterface method to create IPDFFileEdit interface; 4. Use Open method to open the target PDF file; 5. Retrieve IPDFSecuritySetting interface through GetSecurityInterface method. 6. Utilize methods of IPDFSecuritySetting interface to set passwords and various permissions; 7. Do call SetSecurity method to apply the previous configurations; 8. Release the created IPDFFileEdit interface; 9. Uninitialize and release the IPDFCmd interface. 16
  • 17. PDF CMD SDK V. Error handling Error information in PDF CMD is maintained through standard component automation error handling ways. Once a return value indicates an error occurred, application could use GetErrorInfo API to retrieve the associated IErrorInfo object which contains detailed information of the last error. For error handling other than C++ environment, please refer to manual of the specific programming language. 17
  • 18. PDF CMD SDK  Reference PDF CMD includes following component objects: PDFCreate PDFCmd PDFLibrarian PDF2Image 18
  • 19. PDF CMD SDK I. PDFCreate PDFCreate; the most important and complex component object in PDF CMD, can convert any printable document format to PDF by “PRINTING” to the virtual printer “DocuCom PDF Driver”. Various conversion settings are presented including: page setup, image compression, font embedding, etc. An event handler interface _IPDFCreateEvents is defined for applications to receive events during conversion. An additional interface IWordMacroSetting controls further conversion options for Microsoft Office Word. Though multi-thread support is build in PDFCreate for converting multiple documents at the same time, multi-threaded printing compatible applications are a must in order to succeed in such cases. Some ubiquitious applications are known to have issues during multi-threaded printing, such as Microsoft Word, Micrsoft Excel and Microsoft PowerPoint. Single-thread restriction is applied for those application in PDFCreate. Note that since the conversion is actually a printing process, the application natively supporting the original document format has to be installed on the host operating system. Ex. to convert “.doc” files, Microsoft Office Word or any other applications that support printing of “.doc” file must exist. 19
  • 20. PDF CMD SDK i. IPDFCreate IPDFCreate is the default sink interface of PDFCreat component object, and provides methods for initializing of PDFCreate component object and file conversion. Conversion setting interfaces incudeing IPDFGeneralSetting, IPDFComressionSetting, IPDFFontEmbedSetting and IWordMacroSetting can also be retrieved from this interface. 20
  • 21. PDF CMD SDK IPDFCreate Interface 1. Initialize Description Initialize the PDFCreate component object. Syntax HRESULT Initialize ( BSTR sn, long reserved ); Parameters sn [in] Serial number. reserved [in] Reserved for Zeon Corporation. Must be set to 0. Return Values S_OK The method succeeded. Others Fail to initialize. Return error information through IErrorInfo Interface. Remarks PDFCreate must be initialized before invoking its method. 21
  • 22. PDF CMD SDK IPDFCreate Interface 2. Uninitialize Description Close the PDFCreate component. Syntax HRESULT Uninitialize ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks This method must be called before terminating the application. 22
  • 23. PDF CMD SDK IPDFCreate Interface 3. IsFileTypeSupported Description Whether specific file type is supported. Syntax HRESULT IsFileTypeSupported ( BSTR sfileext, VARIANT_BOOL *pbIsFileTypeSupproted ); Parameters sfileext [in] File extension, such as “.doc”. “.” is a must. pbIsFileTypeSupproted [out, retval] Whether the specific file type is supported. TRUE = Supported. FALSE = Unsupported. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Caution: “.pdf” file is not supported. 23
  • 24. PDF CMD SDK IPDFCreate Interface 4. Convert Description Convert other format files to PDF Syntax HRESULT Convert ( BSTR sSourceFile, BSTR sDestFile ); Parameters sSourceFile [in] Full path of the source file you want to convert to PDF. sDestFile [in] Destination path to save the resulting PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Four events are fired during converting: StartDoc, StartPage, EndPage, and EndDoc. 24
  • 25. PDF CMD SDK IPDFCreate Interface 5. StopCreating Description Used to stop conversion in process. Syntax HRESULT StopCreating ( long lJobID ); Parameters lJobID [in] Job ID returned by StartDoc. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 25
  • 26. PDF CMD SDK IPDFCreate Interface 6. RestoreDefaultSettings Description Restore the default settings of PDFCreate. Syntax HRESULT RestoreDefaultSettings ( long reserved ); Parameters reserved [in] Reserved for Zeon Corporation. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Related setting is available through IPDFGeneralSetting, IPDFCompressionSetting, and IPDFFondEmbedSetting interfaces. 26
  • 27. PDF CMD SDK IPDFCreate Interface 7. SetTimeOut Description Set time out value for a single convert job. Syntax HRESULT SetTimeOut ( long lMillisecond ); Parameters lMillisecond [in] Maximum time interval for a single convert job. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 27
  • 28. PDF CMD SDK IPDFCreate Interface 8. SetExcelSheetRange Description Set the range of the Excel Sheet you want to convert. Syntax HRESULT SetExcelSheetRange ( BSTR sRange ); Parameters sRange [in] Specifies the zero based range number of the Excel sheet to convert ,Empty to convert all sheets. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 28
  • 29. PDF CMD SDK IPDFCreate Interface 9. ConvertWithIni Description Convert other format files to PDF according to ini setting. Syntax HRESULT ConvertWithIni ( BSTR sSourceFile, BSTR sDestFile, BSTR sGeneralIniFilePath, BSTR sDestinationIniFilePath, BSTR sCompressionIniFilePath, BSTR sFontIniFilePath, BSTR sDocumentIniFilePath, BSTR sSecurityIniFilePath, BSTR sWatermarkIniFilePath ); Parameters sSourceFile [in] Full path of the source file you want to convert to PDF. sDestFile [in] Destination path to save the resulting PDF file. sGeneralIniFilePath [in] General ini setting file path. sDestinationIniFilePath [in] Destination ini setting file path. sCompressionIniFilePath [in] Compression ini setting file path. sFontIniFilePath [in] Font ini setting file path. sDocumentIniFilePath [in] Document ini setting file path. sSecurityIniFilePath [in] Security ini setting file path. sWatermarkIniFilePath [in] Watermark ini setting file path. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorinfo Interface. 29
  • 30. PDF CMD SDK Remarks Four events are fired during converting: StartDoc, StartPage, EndPage, and EndDoc. 30
  • 31. PDF CMD SDK IPDFCreate Interface 10. GetGeneralSettingInterface Description Get general setting interface. Syntax HRESULT GetGeneralSettingInterface ( LPDISPATCH * lppDisp ); Parameters lppDisp [out, retval] Return General Setting Interface. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 31
  • 32. PDF CMD SDK IPDFCreate Interface 11. GetCompressionSettingInterface Description Get compression setting interface. Syntax HRESULT GetCompressionSettingInterface ( LPDISPATCH * lppDisp ); Parameters lppDisp [out, retval] Return Compression Setting Interface. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 32
  • 33. PDF CMD SDK IPDFCreate Interface 12. GetFontEmbedSettingInterface Description Get font embed setting interface. Syntax HRESULT GetFontEmbedSettingInterface ( LPDISPATCH * lppDisp ); Parameters lppDisp [out, retval] Return font embed setting interface. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 33
  • 34. PDF CMD SDK IPDFCreate Interface 13. GetWordMacroSettingInterface Description Get Word Macro setting interface. Syntax HRESULT GetWordMacroSettingInterface ( LPDISPATCH * lppDisp ); Parameters lppDisp [out, retval] Return Word Macro setting interface. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 34
  • 35. PDF CMD SDK IPDFCreate Interface 14. GetVolumeLimit Description Get volume limit value. Syntax HRESULT GetVolumeLimit ( long * pPages, long * pFiles ); Parameters pPages [out, retval] Return volume limited pages number. pFiles [out, retval] Return volume limited files number. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 35
  • 36. PDF CMD SDK IPDFCreate Interface 15. GetVolumeLeft Description Get volume left value. Syntax HRESULT GetVolumeLeft ( long * pPages, long * pFiles ); Parameters pPages [out, retval] Return volume left pages number. pFiles [out, retval] Return volume left files number. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 36
  • 37. PDF CMD SDK ii. _IPDFCreateEvents Through _IPDFCreateEvents interface, application can receive events dring file conversion. 37
  • 38. PDF CMD SDK _IPDFCreateEvents Interface 1. StartDoc Description Inform the application that file conversion starts. Syntax void StartDoc ( long lJobID, BSTR sFileName ); Parameters SFileName [in] Full path of resulting PDF file. lJobID [in] A number used to identify the file being processed. Return Values None Remarks None 38
  • 39. PDF CMD SDK _IPDFCreateEvents Interface 2. StartPage Description Inform the application that the specific page starts to be converted. Syntax void StartPage (long JobID, long iPageNo ); Parameters iPageNo [in] Specifies which page is being processed. lJobID [in] A number used to identify the file being processed. Return Values None Remarks None 39
  • 40. PDF CMD SDK _IPDFCreateEvents Interface 3. EndPage Description Inform the application that the specific page has been converted. Syntax void EndPage (long JobID ); Parameters lJobID [in] A number used to identify the file being processed. Return Values None Remarks Corresponding page number has been obtained by previous StartPage. 40
  • 41. PDF CMD SDK _IPDFCreateEvents Interface 4. EndDoc Description Inform the application, that the conversion has been finished. Syntax void EndDoc ( long JobID ); Parameters lJobID [in] A number used to identify the file being processed. Return Values None Remarks Corresponding file path has been obtained by previous StartDoc. 41
  • 42. PDF CMD SDK _IPDFCreateEvents Interface 5. Abort Description Inform the application that conversion process has been terminated. Syntax void Abort ( long JobID ); Parameters lJobID [in] A number used to identify the file being processed. Return Values None Remarks When conversion process is terminated, COM will send this event, except that the process is cancel by the application through StopCreating. 42
  • 43. PDF CMD SDK iii. IPDFGeneralSetting This interface provides methods to get or set general property related to file conversion. IPDFGeneralSetting interface should be retrieved through GetGeneralSettingInterface method. 43
  • 44. PDF CMD SDK IPDFGeneralSetting Interface 1. UseCustomPageSize Description UseCustomPageSize proterty.constrols whether to use the customized page size. Syntax HRESULT get_UseCustomPageSize ( VARIANT_BOOL *pbUseCustomPageSize ); HRESULT put_UseCustomPageSize ( VARIANT_BOOL bUseCustomPageSize ); Parameters pbUseCustomPageSize [out, retval] bUseCustomPageSize [in] A boolean variable specifies whether to use the customized page size TRUE = Use customized page size. FALSE = Do not use customized page size. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 44
  • 45. PDF CMD SDK IPDFGeneralSetting Interface 2. StandardPageSize Description StandardPageSize property controls the standard page size in use. Syntax HRESULT get_StandardPageSize ( StandardPageSizeEnum *peStandardPageSize ); HRESULT put_StandardPageSize ( StandardPageSizeEnum eStandardPageSize ); Parameters peStandardPageSize [out, retval] eStandardPageSize [in] A StandardPageSizeEnum variable specifiess which predefined standard page size is in use. Default is SP_A4. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of StandardPageSizeEnum: enum { SP_Letter = 0, SP_Legal = 1, SP_Tabloid = 2, SP_A4 = 3, SP_A3 = 4, SP_Executive = 5, SP_B4 = 6, SP_B5 = 7, SP_Screen =8 } StandardPageSizeEnum ; 45
  • 46. PDF CMD SDK IPDFGeneralSetting Interface 3. Unit Description Unit property controls the unit used. Syntax HRESULT get_Unit ( UnitEnum *peUnit ); HRESULT put_Unit ( UnitEnum eUnit ); Parameters peUnit [out, retval] eUnit [in] A UnitEnum variable specifiess which predefined unit is in use. Default is Unit_Inches. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of UnitEnum: enum { Unit_Inches = 0, Unit_MM = 1, Unit_Points =.2 } UnitEnum ; 46
  • 47. PDF CMD SDK IPDFGeneralSetting Interface 4. Margin Description Margin property controls the paper margin in use. Syntax HRESULT get_Margin ( double * pdMargin ); HRESULT put_Margin ( double dMargin ); Parameters pdMargin [out, retval] dMargin [in] A double variable specifies the paper margin in given unit. Default is 0.25. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 47
  • 48. PDF CMD SDK IPDFGeneralSetting Interface 5. Width Description Width property controls the paper width in use. Syntax HRESULT get_Width ( double *pdWidth ); HRESULT put_Width ( double dWidth ); Parameters pdWidth [out, retval] dWidth [in] A double variable specifies the paper width in given unit. Default is 200. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 48
  • 49. PDF CMD SDK IPDFGeneralSetting Interface 6. Height Description Height property controls the paper height in use. Syntax HRESULT get_Height ( double *pdHeight ); HRESULT put_Height ( double dHeight ); Parameters pdHeight [out, retval] dHeight [in] A double variable specifies the paper height in use. Dafault is 200. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 49
  • 50. PDF CMD SDK IPDFGeneralSetting Interface 7. Orientation Description Orientation property controls the paper orientation in use, portrait or landscape. Syntax HRESULT get_Orientation ( OrientationEnum *peOrientation ); HRESULT put_Orientation ( OrientationEnum eOrientation ); Parameters peOrientation [out, retval] A OrientationEnum variable specifies which predefined orientation is in use. Default is Orien_Portrait. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of OrientationEnum: enum { Orient_Portrait = 1, Orient_Landscape = 2 } OrientationEnum ; 50
  • 51. PDF CMD SDK IPDFGeneralSetting Interface 8. Resolution Description Resolution property controls the printer resolution in use. Syntax HRESULT get_Resolution ( ResolutionEnum *peResolution ); HRESULT put_Resolution ( ResolutionEnum eResolution ); Parameters peResolution [out, retval] eResolution [in] A ResolutionEnum variable specifies which predefined printer resolution is in use. Default is Resolution_600. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of ResolutionEnum enum { Resolution_72 = 0, Resolution_150 = 1, Resolution_300 = 2, Resolution_600 = 3, Resolution_1200 = 4, Resolution_2400 = 5 } ResolutionEnum ; 51
  • 52. PDF CMD SDK IPDFGeneralSetting Interface 9. ZoomScale Description Scale property controls the scale factor to be applied to pages. Syntax HRESULT get_ZoomScale ( long *plScale ); HRESULT put_ZoomScale ( long lScale ); Parameters plScale [out, retval] lScale [in] A long variable specifies the scale factor in use. Default is 100 Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 52
  • 53. PDF CMD SDK IPDFGeneralSetting Interface 10. Compatible Description Compatible controls the PDF specification version to be compatible of the resulting PDF file. Syntax HRESULT get_Compatible ( CompatibleEnum *peCompatible ); HRESULT put_Compatible ( CompatibleEnum eCompatible ); Parameters peCompatible [out, retval] eCompatible [in] A CompatibleEnum variable specifies the PDF specification to be compatible. Default is Compatible_PDF14. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of CompatibleEnum: enum { Compatible_PDF13 = 0, Compatible_PDF14 = 1, Compatible_PDF15 = 2, Compatible_PDF16 = 3, Compatible_PDF17 = 4, Compatible_PDFA = -1 } CompatibleEnum ; 53
  • 54. PDF CMD SDK IPDFGeneralSetting Interface 11. ViewPDF Description ViewPDF property controls whether to view the resulting PDF file after conversion. Syntax HRESULT get_ViewPDF ( VARIANT_BOOL *pbViewPDF ); HRESULT put_ViewPDF ( VARIANT_BOOL bViewPDF ); Parameters pbViewPDF [out, retval] bViewPDF [in] A boolean variable specifies whether to view the resulting PDF file. TRUE = View the resulting PDF file. FALSE = Do not view the resulting PDF file. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None. 54
  • 55. PDF CMD SDK IPDFGeneralSetting Interface 12. OptimizePDF Description OptimizePDF property controls whether to optimize the resulting PDF file Syntax HRESULT get_OptimizePDF ( VARIANT_BOOL *pbOptimizePDF ); HRESULT put_OptimizePDF ( VARIANT bOptimizePDF ); Parameters pbOptimizePDF [out, retval] bOptimizePDF [in] A boolean variable specifies whether to optimize the resulting PDF file. TURE = Optimize the resulting PDF file. FALSE = Do not optimize the resulting PDF file. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 55
  • 56. PDF CMD SDK iv. IPDFCompressionSetting This interface provides methods to get or set properties related to compression settings while converting files. IPDFCompressionSetting interface should be retrieved through GetCompressionSettinginterface method. 56
  • 57. PDF CMD SDK IPDFCompressionSetting Interface 1. AutoCompression Description AutoCompression property controls whether to use auto compression while converting files. Syntax HRESULT get_AutoCompression ( VARIANT_BOOL *pbAutoCompression ); HRESULT put_AutoCompression ( VARIANT_BOOL bAutoCompression ); Parameters pbAutoCompression [out, retval] bAutoCompression [in] A boolean variable specifies whether to use auto compression while converting files. TRUE = Use auto compression. FALSE = Do not use auto compression. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 57
  • 58. PDF CMD SDK IPDFCompressionSetting Interface 2. AutoCompressionRate Description AutoCompressionRate property controls rate optimized for general use. Syntax HRESULT get_AutoCompressionRate ( long *plAutoCompressionRate ); HRESULT put_AutoCompressionRate ( long lAutoCompressionRate ); Parameters plAutoCompressionRate [out, retval] lAutoCompressionRate [in] A long variable specifies the rate optimized for general use. Default is 50. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 58
  • 59. PDF CMD SDK IPDFCompressionSetting Interface 3. CompressColor Description CompressColor property controls whether to compress color images while converting files. Syntax HRESULT get_CompressColor ( VARIANT_BOOL *pbCompressColor ); HRESULT put_CompressColor ( VARIANT_BOOL bCompressColor ); Parameters pbCompressColor [out, retval] bCompressColor [in] A boolean variable specifies whether to compress color images while converting files. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 59
  • 60. PDF CMD SDK IPDFCompressionSetting Interface 4. ColorCompressMethod Description ColorCompressMethod property controls which predefined compression method is in use for compressing for color image.. Syntax HRESULT get_ColorCompressMethod ( ColorCompressMethodEnum *peColorCompressMethod ); HRESULT put_ColorCompressMethod ( ColorCompressMethodEnum eColorCompressMethod ); Parameters peColorCompressMethod [out, retval] eColorCompressMethod [in] A ColorCompressMethodEnum variable specifies which predefined compression method to use for compressing color image. Default is CCM_JPEG_MEDIUM. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of ColorCompressMethodEnum: enum { CCM_JPEG_HIGH = 0, CCM_JPEG_MEDIUMHIGH = 1, CCM_JPEG_MEDIUM = 2, CCM_JPEG_MEDIUMLOW = 3, CCM_JPEG_LOW = 4, CCM_ZIP = 5, CCM_JPEG2000_HIGH = 15, CCM_JPEG2000_MEDIUMHIGH = 16, CCM_JPEG2000_MEDIUM = 17, CCM_JPEG2000_MEDIUMLOW = 18, CCM_JPEG2000_LOW = 19 } ColorCompressMethodEnum ; 60
  • 61. PDF CMD SDK IPDFCompressionSetting Interface 5. ReSampleColor Description ReSampleColor controls whether to resample color image while converting files. Syntax HRESULT get_ReSampleColor ( VARIANT_BOOL *pbReSampleColor ); HRESULT put_ReSampleColor ( VARIANT_BOOL bReSampleColor ); Parameters pbReSampleColor [out, retval] bReSampleColor [in] A boolean variable specifies whether to resample color image while converting files. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 61
  • 62. PDF CMD SDK IPDFCompressionSetting Interface 6. ColorReSampleMethod Description ColorReSampleMethod controls which predefined resample method is in use for resampling color image. Syntax HRESULT get_ColorReSampleMethod ( ReSampleMethodEnum *peColorReSampleMethod ); HRESULT put_ColorReSampleMethod ( ReSampleMethodEnum eColorReSampleMethod ); Parameters peColorReSampleMethod [out, retval] eColorReSampleMethod [in] A ReSampleMethodEnum variable specifies which predefined resample method is in use for resampling color image. Default is Down_Sample. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks enum { Down_Sample = 0, Sub_Sample =1 } ReSampleMethodEnum ; 62
  • 63. PDF CMD SDK IPDFCompressionSetting Interface 7. ColorReSampleResolution Description ColorReSampleResolution controls the minimum resolution for resampling color image. Syntax HRESULT get_ColorReSampleResolution ( long *plColorReSampleResolution ); HRESULT put_ColorReSampleResolution ( long lColorReSampleResolution ); Parameters plColorReSampleResolution [out, retval] lColorReSampleResolution [in] A long variable specifies the minimum resolution for resampling color image. Default is 150. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 63
  • 64. PDF CMD SDK IPDFCompressionSetting Interface 8. CompressGray Description CompressGray property control whether to compress gray images while converting files. Syntax HRESULT get_CompressGary ( VARIANT_BOOL *pbCompressGray ); HRESULT put_CompressGray ( VARIANT_BOOL bCompressGray ); Parameters pbCompressGray [out, retval] bCompressGray [in] A boolean variable specifies whether to compress gray images while converting files. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 64
  • 65. PDF CMD SDK IPDFCompressionSetting Interface 9. GrayCompressMethod Description GrayCompressMethod property controls which predefined compression method is in use for compressing gray image. Syntax HRESULT get_GrayCompressMethod ( ColorCompressMethodEnum *peGrayCompressMethod ); HRESULT put_GrayCompressMethod ( ColorCompressMethodEnum eGrayCompressMethod ); Parameters peGrayCompressMethod [out, retval] eGrayCompressMethod [in] A ColorCompressMethodEnum specifies which predefined compression method to use for compressing gray image. Default is CCM_JPEG_MEDIUM. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks See definition of ColorCompressMethod. 65
  • 66. PDF CMD SDK IPDFCompressionSetting Interface 10. ReSampleGray Description ReSampleGray property controls whether to resample gray image while converting files. Syntax HRESULT get_ReSampleGray ( VARIANT_BOOL *pbReSampleGray ); HRESULT put_ReSampleGray ( VARIANT_BOOL bReSampleGary ); Parameters pbReSampleGray [out, retval] bReSampleGray [in] A boolean variable specifies whether to resample gray image while converting files. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 66
  • 67. PDF CMD SDK IPDFCompressionSetting Interface 11. GrayReSampleMethod Description GrayReSampleMethod proerty controls which predefined resample method is in use for resampling gray image. Syntax HRESULT get_GrayReSampleMethod ( ReSampleMethodEnum *peGrayReSampleMethod ); HRESULT put_GrayReSampleMethod s( ReSampleMethodEnum eGrayReSampleMethod ); Parameters peGrayReSampleMethod [out, retval] eGrayReSampleMethod [in] A ReSampleMethodEnum variable specifies which predefined resample method is in use for resampling gray image. Default is Down_Sample. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks See definition of ReSampleMethodEnum. 67
  • 68. PDF CMD SDK IPDFCompressionSetting Interface 12. GrayReSampleResolution Description GrayReSampleResolution property controls the minimum resolution for resampling gray image. Syntax HRESULT get_GrayReSampleResolution ( long *plGrayReSampleResolution ); HRESULT put_GrayReSampleResolution ( long lGrayReSampleResolution ); Parameters plGrayReSampleResolution [out, retval] lGrayReSampleResolution [in] A long variable specifies the minimum resolution for resampling gray image. Default is 300. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 68
  • 69. PDF CMD SDK IPDFCompressionSetting Interface 13. CompressMono Description CompressMono property controls whether to compress Mono images while converting files. Syntax HRESULT get_CompressMono ( VARIANT_BOOL *pbCompressMono ); HRESULT put_CompressMono ( VARIANT_BOOL bCompressMono ); Parameters pbCompressMono [out, retval] bCompressMono [in] A boolean variable specifies whether to compress mono images while converting files. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 69
  • 70. PDF CMD SDK IPDFCompressionSetting Interface 14. MonoCompressMethod Description MonoCompressMethod property controls which predefined compression method is in use for compressing mono image. Syntax HRESULT get_MonoCompressMethod ( MonoCompressMethodEnum *peMonoCompressMethod ); HRESULT put_MonoCompressMethod ( MonoCompressMethodEnum eMonoCompressMethod ); Parameters peMonoCompressMethod [out, retval] eMonoCompressMethod [in] A MonoCompressMethodEnum specifies which predefined compression method to use for compressing mono image. Default is MCM_CCITT4. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks See definition of MonoCompressMethodEnum: enum { MCM_ZIP = 5, MCM_CCITT3 = 6, MCM_CCITT4 = 7, MCM_RunLength = 8, } MonoCompressMethodEnum ; 70
  • 71. PDF CMD SDK IPDFCompressionSetting Interface 15. ReSampleMono Description ReSampleMono property controls whether to resample mono image while converting files. Syntax HRESULT get_ReSampleMono ( VARIANT_BOOL *pbReSampleMono ); HRESULT put_ReSampleMono ( VARIANT_BOOL bReSampleMono ); Parameters pbReSampleMono [out, retval] bReSampleMono [in] A boolean variable specifies whether to resample Mono image while converting files. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 71
  • 72. PDF CMD SDK IPDFCompressionSetting Interface 16. MonoReSampleMethod Description MonoReSampleMethod property controls which predefined resample method is in use for resampling mono image. Syntax HRESULT get_MonoReSampleMethod ( ReSampleMethodEnum *peMonoReSampleMethod ); HRESULT put_MonoReSampleMethod ( ReSampleMethodEnum eMonoReSampleMethod ); Parameters peMonoReSampleMethod [out, retval] eMonoReSampleMethod [in] A ReSampleMethodEnum variable specifies which predefined resample method is in use for resampling mono image. Default is Down_Sample. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks See definition of ReSampleMethodEnum. 72
  • 73. PDF CMD SDK IPDFCompressionSetting Interface 17. MonoReSampleResolution Description MonoReSampleResolution property controls the minimum resolution for resampling mono image. Syntax HRESULT get_MonoReSampleResolution ( long *plMonoReSampleResolution ); HRESULT put_MOnoReSampleResolution ( long lMonoReSampleResolution ); Parameters plMonoReSampleResolution [out, retval] lMonoReSampleResolution [in] A long variable specifies the minimum resolution for resampling mono image. Default is 300. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 73
  • 74. PDF CMD SDK v. IPDFFontEmbedSetting This interface provides methods to get or set properties related to fond embed settings while converting files. IPDFFontEmbedSetting interface should be retrieved through GetFontEmbedSettingInterface method. 74
  • 75. PDF CMD SDK IPDFFontEmbedSetting Interface 1. EmbedAllFonts Description EmbedAllFonts property controls whether to embed all the fonts while converting files. Syntax HRESULT get_EmbedAllFonts ( VARIANT_BOOL *pbEmbedAllFonts ); HRESULT put_EmbedAllFonts ( VARIANT_BOOL bEmbedAllFonts ); Parameters pbEmbedAllFonts [out, retval] bEmbedAllFonts [in] A VARIANT_BOOL Variable receives whether to ember all the fonts while converting files. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 75
  • 76. PDF CMD SDK IPDFFontEmbedSetting Interface 2. SubsetFont Description SubsetFont property controls whether to subset the embedded font while converting files. Syntax HRESULT get_SubsetFont ( VARIANT_BOOL *pbSubsetFont ); HRESULT put_SubsetFont ( VARIANT_BOOL bSubsetFont ); Parameters pbSubsetFont [out, retval] bSubsetFont [in] A boolean variable specifies whether to subset the embedded font while converting files. Default is TRUE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 76
  • 77. PDF CMD SDK IPDFFontEmbedSetting Interface 3. SubsetThreshold Description SubsetThreshold property controls the maximum threshold for only embedding the referenced characters of specific font while converting files, otherwise all the characters in the font will be embedded. Syntax HRESULT get_SubsetThreshold ( long *plSubsetThreshold ); HRESULT put_SubsetThreshold ( long lSubsetThreshold ); Parameters plSubsetThreshold [out, retval] lSubsetThreshold [in] A to long variable specifies the maximum threshold for only embedding the referenced characters of specific font. Default is 75 which means the maximum threshold is 75%. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 77
  • 78. PDF CMD SDK IPDFFontEmbedSetting Interface 4. EnableAlwaysEmbed Description EnableAlwaysEmbed property controls whether to enable the always embed font list Syntax HRESULT get_EnableAlwaysEmbed ( VARIANT_BOOL *pbEnableAlwaysEmbed ); HRESULT put_EnableAlwaysEmbed ( VARIANT_BOOL bEnableAlwaysEmbed ); Parameters pbEnableAlwaysEmbed [out, retval] bEnableAlwaysEmbed [in] A boolean variable specifies whether to enable the always embed font list. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 78
  • 79. PDF CMD SDK IPDFFontEmbedSetting Interface 5. AlwaysEmbedCount Description AlwaysEmbedCount property controls the number of fonts in the always embed font list. Syntax HRESULT get_AlwaysEmbedCount ( long *plAlwaysEmbedCount ); HRESULT put_AlwaysEmbedCount ( long lAlwaysEmbedCount ); Parameters plAlwaysEmbedCount [out, retval] lAlwaysEmbedCount [in] A long variable specifies the number of fonts in the always embed font list. Default is 0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 79
  • 80. PDF CMD SDK IPDFFontEmbedSetting Interface 6. AlwaysEmbedFontName Description AlwaysEmbedFontName property controls the name of the font in the always embed font list. Syntax HRESULT get_AlwaysEmbedFontName ( long index, BSTR *psAlwaysEmbedFontName ); HRESULT put_AlwaysEmbedFontName ( long index, BSTR sAlwaysEmbedFontName ); Parameters index [in] Zero-based index of the font name in the always embed font list. psAlwaysEmbedFontName [out, retval] sAlwaysEmbedFontName [in] A BSTR variable specifies the font name indicated by index. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 80
  • 81. PDF CMD SDK IPDFFontEmbedSetting Interface 7. EnableNeverEmbed Description EnableNeverEmbed property controls whether to enable the never embed font list Syntax HRESULT get_EnableNeverEmbed ( VARIANT_BOOL *pbEnableNeverEmbed ); HRESULT put_EnableNeverEmbed ( VARIANT_BOOL bEnableNeverEmbed ); Parameters pbEnableNeverEmbed [out, retval] bEnableNeverEmbed [in] A boolean variable specifies whether to enable the never embed font list. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 81
  • 82. PDF CMD SDK IPDFFontEmbedSetting Interface 8. NeverEmbedCount Description NeverEmbedCount property controls the number of fonts in the never embed font list. Syntax HRESULT get_NeverEmbedCount ( long *plNeverEmbedCount ); HRESULT put_NeverEmbedCount ( long lNeverEmbedCount ); Parameters plNeverEmbedCount [out, retval] lNeverEmbedCount [in] A long variable specifies the number of fonts in the never embed font list. Default is 0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 82
  • 83. PDF CMD SDK IPDFFontEmbedSetting Interface 9. NeverEmbedFontName Description NeverEmbedFontName property controls the name of the font in the never embed font list. Syntax HRESULT get_NeverEmbedFontName ( long index, BSTR *psNeverEmbedFontName ); HRESULT put_NeverEmbedFontName ( long index, BSTR sNeverEmbedFontName ); Parameters index [in] Zero-based index of the font name in the never embed font list. psNeverEmbedFontName [out, retval] sNeverEmbedFontName [in] A BSTR variable specifies the font name indicated by index. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 83
  • 84. PDF CMD SDK vi. IWordMacroSetting This interface provides methods to get or set properties related to WordMacro settings while converting Microsoft Word files. IWordMacroSetting interface should be retrieved through GetWordMacroSettingInterface method. 84
  • 85. PDF CMD SDK IWordMacroSetting Interface 1. AutoBookmark Description AutoBookmark property controls whether to add bookmark while converting files. Syntax HRESULT get_AutoBookmark ( VARIANT_BOOL * pbAutoBookmark ); HRESULT put_AutoBookmark ( VARIANT_BOOL bAutoBookmark ); Parameters pbAutoBookmark [out, retval] bAutoBookmark [in] A boolean variable specifies whether to add bookmark while converting files. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 85
  • 86. PDF CMD SDK IWordMacroSetting Interface 2. DoNote Description DoNote property controls whether to add note while converting files. Syntax HRESULT get_DoNote ( VARIANT_BOOL * pbDoNote ); HRESULT put_DoNote ( VARIANT_BOOL bDoNote ); Parameters pbDoNote [out, retval] bDoNote [in] A boolean variable specifies whether to add note while converting files. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 86
  • 87. PDF CMD SDK IWordMacroSetting Interface 3. DoInternetLink Description DoInternetLink property controls whether to add internet link while converting files. Syntax HRESULT get_DoInternetLink ( VARIANT_BOOL * pbDoInternetLink ); HRESULT put_DoInternetLink ( VARIANT_BOOL bDoInternetLink ); Parameters pbDoInternetLink [out, retval] bDoInternetLink [in] A boolean variable specifies whether to add internet link while converting files. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 87
  • 88. PDF CMD SDK IWordMacroSetting Interface 4. DoCrossDocuLink Description DoCrossDocuLink property controls whether to add cross document link while converting files. Syntax HRESULT get_DoCrossDocuLink ( VARIANT_BOOL * pbDoCrossDocuLink ); HRESULT put_DoCrossDocuLink ( VARIANT_BOOL bDoCrossDocuLink ); Parameters pbDoCrossDocuLink [out, retval] DoCrossDocuLink [in] A boolean variable specifies whether to add cross document link while converting files. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 88
  • 89. PDF CMD SDK IWordMacroSetting Interface 5. DoCrossRefLink Description DoCrossRefLink property controls whether to add cross reference link while converting files. Syntax HRESULT get_DoCrossRefLink ( VARIANT_BOOL * pbDoCrossRefLink ); HRESULT put_DoCrossRefLink ( VARIANT_BOOL bDoCrossRefLink ); Parameters pbDoCrossRefLink [out, retval] DoCrossRefLink [in] A boolean variable specifies whether to add cross reference link while converting files. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 89
  • 90. PDF CMD SDK IWordMacroSetting Interface 6. ConvertTextBox Description ConvertTextBox property controls whether to convert textbox while converting files. Syntax HRESULT get_ConvertTextBox ( VARIANT_BOOL * pbConvertTextBox ); HRESULT put_ConvertTextBox ( VARIANT_BOOL bConvertTextBox ); Parameters pbConvertTextBox [out, retval] bConvertTextBox [in] A boolean variable specifies whether to convert textbox while converting files. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 90
  • 91. PDF CMD SDK IWordMacroSetting Interface 7. AutoComment Description AutoComment property controls whether to add comment while converting files. Syntax HRESULT get_AutoComment ( VARIANT_BOOL * pbAutoComment ); HRESULT put_AutoComment ( VARIANT_BOOL bAutoComment ); Parameters pbAutoComment [out, retval] bAutoComment [in] A boolean variable specifies whether to add comment while converting files. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 91
  • 92. PDF CMD SDK II. PDFCmd PDFCmd component object provides interface to modify PDF document including: document information, security setting, open option, page manipulation, watermark, combination, and package. 92
  • 93. PDF CMD SDK i. IPDFCmd IPDFCmd is the default sink interface of PDFCmd component object. Provides methods for initializing PDFCmd component object besides methods to create IPDFFileEdit, IPDFCombine and IPDFPackage interfaces. 93
  • 94. PDF CMD SDK IPDFCmd Interface 1. Initialize Description Initialize the PDFCmd component. Syntax HRESULT Initialize ( BSTR sn, long reserved ); Parameters sn [in] Serial number. reserved [in] Reserved for Zeon Corporation. Must be set to 0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks PDFCmd must be initialized before invoking its method. 94
  • 95. PDF CMD SDK IPDFCmd Interface 2. Uninitialize Description Close the PDFCmd component Syntax HRESULT Uninitialize ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks This method must be called before terminating the application. 95
  • 96. PDF CMD SDK IPDFCmd Interface 3. CreateFileEditInterface Description Create a IPDFFileEdit interface. Syntax HRESULT CreateFileEditInterface ( LPDISPATCH *piFileEdit ); Parameters piFileEdit [out, retval] A pointer to the returned IPDFFileEdit interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should release the interface after using it. 96
  • 97. PDF CMD SDK IPDFCmd Interface 4. CreateCombineInterface Description Create a IPDFCombine interface. Syntax HRESULT CreateCombineInterface ( LPDISPATCH *piCombine ); Parameters piCombine [out, retval] A pointer to the returned IPDFCombine interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should release the interface after using it. 97
  • 98. PDF CMD SDK IPDFCmd Interface 5. CreatePackageInterface Description Create a IPDFCombine interface. Syntax HRESULT CreatePackageInterface ( LPDISPATCH *piPackage ); Parameters piPackage [out, retval] A pointer to the returned IPDFCombine interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should release the interface after using it. 98
  • 99. PDF CMD SDK IPDFCmd Interface 6. Compatible Description Compatible proptery controls PDF specification versions to be compatible of the modified PDF file. Syntax HRESULT get_Compatible ( CompatibleEnum * peCompatible ); HRESULT put_Compatible ( CompatibleEnum eCompatible ); Parameters peCompatible [out, retval] eCompatible [in] A CompatibleEnum variable specifies the PDF specification to be compatible. Default is Compatible_PDF14. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks See definition of CompatibleEnum. 99
  • 100. PDF CMD SDK ii. IPDFFileEdit IPDFFileEdit is the main interface for editing PDF document. Through you could retrieve IPDFDocInfoSetting, IPDFSecuritySetting, IPDFOpenOptionSetting and create IPDFPageEdit, IPDFTextWatermark, IPDFImageWatermark interfaces. 100
  • 101. PDF CMD SDK IPDFFileEdit Interface 1. Open Description Open a PDF file. Syntax HRESULT Open ( VARIANT sFilePath, BSTR sOpenPassword, BSTR sOwnerPassword ); Parameters sFilePath [in] Full path of the specific PDF file that you want to open. You should pass the type VT_BSTR to this variable and use bstrVal to store the file path. sOpenPassword [in] Password for opening the PDF file. sOwnerPassword [in] Password for modifying the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 101
  • 102. PDF CMD SDK IPDFFileEdit Interface 2. NewPDF Description Create a new PDF file (without any page). Syntax HRESULT NewPDF ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Caution: You can not save the new created PDF file until you add or insert at least one page to the PDF file. 102
  • 103. PDF CMD SDK IPDFFileEdit Interface 3. Save Description Save the PDF file. Syntax HRESULT Save ( BSTR sFilePath); Parameters sFilePath [in] Full destination path of the PDF file. If sFilePath = NULL, save the PDF file directly, otherwise “save as” the PDF file as it is indicated by the value of sFilePath. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 103
  • 104. PDF CMD SDK IPDFFileEdit Interface 4. Close Description Close the PDF file. Syntax HRESULT Close ( void ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 104
  • 105. PDF CMD SDK IPDFFileEdit Interface 5. GetPageNum Description Get the page number of the PDF file. Syntax HRESULT GetPageNum ( long *plPageNum ); Parameters plPageNum [out, retval] A pointer to a long variable specifies the page number of the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 105
  • 106. PDF CMD SDK IPDFFileEdit Interface 6. CreatePageEditInterface Description Create a IPDFPageEdit interface. Syntax HRESULT CreatePageEditInterface ( LPDISPATCH *piPageEdit ); Parameters piPageEdit [out, retval] A Pointer to the returned IPDFPageEdit interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should release the interface after using it. 106
  • 107. PDF CMD SDK IPDFFileEdit Interface 7. AddPDFMark Description Add specific PDF mark file to the PDF file. Syntax HRESULT AddPDFMark ( BSTR sMarkFile ); Parameters sMarkFile [in] Full path of the PDF mark file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 107
  • 108. PDF CMD SDK IPDFFileEdit Interface 8. CreateTextWatermark Description Create a IPDFTextWatermark interface. Syntax HRESULT CreateTextWatermark ( LPDISPATCH *piTextWatermark ); Parameters piTextWatermark [out, retval] A pointer to the returned IPDFTextWatermark interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should release the interface after using it. 108
  • 109. PDF CMD SDK IPDFFileEdit Interface 9. CreateImageWatermark Description Create a IPDFImageWatermark interface. Syntax HRESULT CreateImageWatermark ( LPDISPATCH *piImageWatermark ); Parameters piImageWatermark [out, retval] A pointer to the returned IPDFImageWatermark interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should release the interface after using it. 109
  • 110. PDF CMD SDK IPDFFileEdit Interface 10. GetDocInfoInterface Description Get the IPDFDocInfo interface. Syntax HRESULT GetDocInfoInterface ( LPDISPATCH *piDocInfo ); Parameters piDocInfo [out, retval] A pointer to the returned IPDFDocInfo interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should release the interface after using it. 110
  • 111. PDF CMD SDK IPDFFileEdit Interface 11. GetSecurityInterface Description Get the IPDFSecurity interface. Syntax HRESULT GetSecurityInterface ( LPDISPATCH *piSecurity ); Parameters piSecurity [out, retval] A pointer to the returned IPDFSecurity interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should release the interface after using it 111
  • 112. PDF CMD SDK IPDFFileEdit Interface 12. GetOpenOptionInterface Description Get the IPDFOpenOption interface. Syntax HRESULT GetOpenOptionInterface ( LPDISPATCH *piOpenOption ); Parameters piOpenOption [out, retval] A pointer to the returned IPDFOpenOption interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should release the interface after using it 112
  • 113. PDF CMD SDK iii. IPDFDocInfoSetting Through IPDFDocInfoSetting interface, application could get or set the Document Information of the specific PDF file. IPDFDocInfoSetting interface should be retrieved through GetDocInfoInterface method. 113
  • 114. PDF CMD SDK IPDFDocInfoSetting Interface 1. Title Description Title property controls the title of the PDF file. Syntax HRESULT get_Title ( BSTR *psTitle ); HRESULT put_Title ( BSTR sTitle ); Parameters psTitle [out, retval] sTitle [in] A BSTR variable specifies the title of the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 114
  • 115. PDF CMD SDK IPDFDocInfoSetting Interface 2. Subject Description Subject property controls the subject of the PDF file. Syntax HRESULT get_Subject ( BSTR *psSubject ); HRESULT put_Subject ( BSTR sSubject ); Parameters psSubject [out, retval] sSubject [in] A BSTR variable specifies the subject of the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 115
  • 116. PDF CMD SDK IPDFDocInfoSetting Interface 3. Keyword Description Keyword property controls the keyword of the PDF file. Syntax HRESULT get_Keyword ( BSTR *psKeyword ); HRESULT put_Keyword ( BSTR sKeyword ); Parameters psKeyword [out, retval] sKeyword [in] A BSTR variable specifies the keyword of the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 116
  • 117. PDF CMD SDK IPDFDocInfoSetting Interface 4. Author Description Author property controls the author of the PDF file. Syntax HRESULT get_Author ( BSTR *psAuthor ); HRESULT put_Author ( BSTR sAuthor ); Parameters psAuthor [out, retval] sAuthor [in] A BSTR variable specifies the author of the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 117
  • 118. PDF CMD SDK IPDFDocInfoSetting Interface 5. GetCustomDocInfoCount Description Get the number of custom document information of the specific PDF file. Syntax HRESULT GetCustomDocInfoCount ( long *plCustomInfoCount ); Parameters plCustomInfoCount [out, retval] A pointer to a long variable specifies the number of custom document information of the specific PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 118
  • 119. PDF CMD SDK IPDFDocInfoSetting Interface 6. GetCustomDocInfo Description Get the specific custom document information of the PDF file. Syntax HRESULT GetCustomDocInfo ( long index, BSTR *psCustomKey, BSTR *psCustomValue ); Parameters index [in] Zero-based index of the custom document information in the PDF file. psCustomKey [out, retval] A pointer to a BSTR variable specifies the key name of the custom document information. psCustomValue [out, retval] A pointer to a BSTR variable specifies the value of the custom document information. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 119
  • 120. PDF CMD SDK IPDFDocInfoSetting Interface 7. AddCustomDocInfo Description Add a custom document information to the PDF file. Syntax HRESULT AddCustomDocInfo ( BSTR sCustomKey, BSTR sCustomValue ); Parameters sCustomKey [out, retval] Specifies the key name of the custom document information that you want to add to the PDF file. sCustomValue [out, retval] Specifies the corresponding value of the custom document information. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 120
  • 121. PDF CMD SDK IPDFDocInfoSetting Interface 8. DeleteCustomDocInfo Description Delete a specific custom document information from the PDF file. Syntax HRESULT DeleteCustomDocInfo ( BSTR sCustomKey ); Parameters sCustomKey [out, retval] Specifies the key name of the custom document information that you want to delete. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 121
  • 122. PDF CMD SDK IPDFDocInfoSetting Interface 9. Creator Description Creator property controls the creator of PDF file. Syntax HRESULT get_Creator ( BSTR *psCreator ); HRESULT put_Creator ( BSTR sCreator ); Parameters psCreator [out, retval] sCreator [in] A BSTR variable specifies the creator of the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 122
  • 123. PDF CMD SDK IPDFDocInfoSetting Interface 10. Producer Description Producer property controls the producer of PDF file. Syntax HRESULT get_Producer ( BSTR *psProducer ); HRESULT put_Producer ( BSTR sProducer ); Parameters psProducer [out, retval] sProducer [in] A BSTR variable specifies the producer of the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 123
  • 124. PDF CMD SDK IPDFDocInfoSetting Interface 11. LoadDocInfoSettingFromIni Description Load document information setting from ini setting file. Syntax HRESULT LoadDocInfoSettingFromIni ( BSTR *psIniPath ); Parameters psIniPath [in] the path of document information setting file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 124
  • 125. PDF CMD SDK iv. IPDFSecuritySetting Provide methods to get or set security property of PDF files. IPDFSecuritySetting interface should be retrieved through GetSecurityInterface methodl 125
  • 126. PDF CMD SDK IPDFSecuritySetting Interface 1. open_password Description open_password property controls the open password of specific PDF files. Syntax HRESULT get_open_password ( BSTR *psOpenPassword ); HRESULT put_open_password ( BSTR sOpenPassword ); Parameters psOpenPassword [out, retval] sOpenPassword [in] A BSTR variable specifies the open password of the PDF files. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 126
  • 127. PDF CMD SDK IPDFSecuritySetting Interface 2. owner_password Description owner_password property controls the owner password of specific PDF files. Syntax HRESULT get_owner_password ( BSTR *psOwnerPassword ); HRESULT put_owner_password ( BSTR sOwnerPassword ); Parameters psOwnerPassword [out, retval] sOwnerPassword [in] A BSTR variable specifies the owner password of the PDF files. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 127
  • 128. PDF CMD SDK IPDFSecuritySetting Interface 3. canPrint Description canPrint property controls whether the PDF file is allowed to be printed. Syntax HRESULT get_canPrint ( VARIANT_BOOL *pbCanPrint ); HRESULT put_canPrint ( VARIANT_BOOL bCanPrint ); Parameters pbCanPrint [out, retval] bCanPrint [in] A boolean variable specifies whether the PDF file is allowed to be printed. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 128
  • 129. PDF CMD SDK IPDFSecuritySetting Interface 4. canAnnotate Description canPrint property controls whether you can add annotate to the PDF file. Syntax HRESULT get_canAnnotate ( VARIANT_BOOL *pbCanAnnotate ); HRESULT put_canAnnotate ( VARIANT_BOOL bCanAnnotate ); Parameters pbCanAnnotate [out, retval] bCanAnnotate [in] A boolean variable specifies whether you can add annotation to the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 129
  • 130. PDF CMD SDK IPDFSecuritySetting Interface 5. canCopy Description canCopy property controls whether the PDF file is allowed to be copied. Syntax HRESULT get_canCopy ( VARIANT_BOOL *pbCanCopy ); HRESULT put_canCopy ( VARIANT_BOOL bCanCopy ); Parameters pbCanCopy [out, retval] bCanCopy [in] A boolean variable specifies whether the PDF file is allowed to be copied. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 130
  • 131. PDF CMD SDK IPDFSecuritySetting Interface 6. canModify Description canModify property controls whether the PDF file is allowed to be modified. Syntax HRESULT get_canModify ( VARIANT_BOOL *pbCanModify ); HRESULT put_canModify ( VARIANT_BOOL bCanModify ); Parameters pbCanModify [out, retval] bCanModify [in] A boolean variable specifies whether the PDF file is allowed to be modified. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 131
  • 132. PDF CMD SDK IPDFSecuritySetting Interface 7. canContentCopyAndExtraction Description canContentCopyAndExtraction property controls whether the content of the PDF file is allowed to be copied and extracted. Syntax HRESULT get_canContentCopyAndExtraction ( VARIANT_BOOL *pbCanContentCopyAndExtraction ); HRESULT put_canContentCopyAndExtraction ( VARIANT_BOOL bCanContentCopyAndExtraction ); Parameters pbCanContentCopyAndExtraction [out, retval] bCanContentCopyAndExtraction [in] A boolean variable specifies whether the content of the PDF file is allowed to be copied and extracted. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 132
  • 133. PDF CMD SDK IPDFSecuritySetting Interface 8. canContentAccessForVisuallyImpaired Description canContentAccessForVisuallyImpaired property controls whether the content of the PDF file is allowed to be accessed for visually impaired. Syntax HRESULT get_canContentAccessForVisuallyImpaired ( VARIANT_BOOL *pbCanContentAccessForVisuallyImpaired ); HRESULT put_canContentAccessForVisuallyImpaired ( VARIANT_BOOL bCanContentAccessForVisuallyImpaired ); Parameters pbCanContentAccessForVisuallyImpaired [out, retval] bCanContentCopyAndExtraction [in] A boolean variable specifies whether the content of the PDF file is allowed to be accessed for visually impaired. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 133
  • 134. PDF CMD SDK IPDFSecuritySetting Interface 9. encryptionLevel Description encryptionLevel property controls which predefined encryption level is in use. Syntax HRESULT get_encryptionLevel ( EncryptionLevelEnum *peEncryptionLevel ); HRESULT put_encryptionLevel ( EncryptionLevelEnum eEncryptionLevel ); Parameters peEncryptionLevel [out, retval] eEncryptionLevel [in] A EncryptionLevelEnum variable specifies which predefined encryption level is in use. Default is EL_40Bits. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of EncryptionLevelEnum: enum { EL_None = 0, EL_40Bits = 40, EL_128Bits = 128, EL_128BitsAES = 1280 } EncryptionLevelEnum ; 134
  • 135. PDF CMD SDK IPDFSecuritySetting Interface 10. changesAllowed Description changesAllowed property controls which predefined allowed change level is in use. Syntax HRESULT get_changesAllowed ( ChangesAllowedEnum *peChangesAllowed ); HRESULT put_changesAllowed ( ChangesAllowedEnum eChangesAllowed ); Parameters peChangesAllowed [out, retval] eChangesAllowed [in] A ChangesAllowedEnum variable specifies which predefined allowed change level is in use. Default is CA_GENERAL. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of ChangesAllowedEnum: enum { CA_NOT_ALLOWED = 0, CA_ONLY_DOCUMENT = 1, CA_ONLY_FORM = 2, CA_COMMENT_AUTHOR = 3, CA_GENERAL =4 } ChangesAllowedEnum ; 135
  • 136. PDF CMD SDK IPDFSecuritySetting Interface 11. printingAllowed Description printingAllowed property controls which predefined allowed printing level to use. Syntax HRESULT get_printingAllowed ( PrintingAllowedEnum *pePrintingAllowed ); HRESULT put_printingAllowed ( PrintingAllowedEnum ePrintingAllowed ); Parameters pePrintingAllowed [out, retval] ePrintingAllowed [in] A PrintingAllowedEnum variable specifies which predefined allowed printing level is in use. Default is PA_FULL_ALLOWED. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of PrintingAllowedEnum: enum { PA_NOT_ALLOWED = 0, PA_LOW_RESOLUTION = 1, PA_FULL_ALLOWED =2 } PrintingAllowedEnum; 136
  • 137. PDF CMD SDK IPDFSecuritySetting Interface 12. SetSecurity Description Set the security property to the PDF file. Syntax HRESULT SetSecurity ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks You must call this method to apply all the previous setting to the PDF file. 137
  • 138. PDF CMD SDK IPDFSecuritySetting Interface 13. RemoveSecurity Description Remove security property of the PDF file. Syntax HRESULT RemoveSecurity ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 138
  • 139. PDF CMD SDK IPDFSecuritySetting Interface 14. LoadSecuritySettingFromIni Description Load Security setting from ini setting file. Syntax HRESULT LoadSecuritySettingFromIni ( BSTR sIniPath ); Parameters sIniPath [in] The path of security ini setting file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 139
  • 140. PDF CMD SDK IPDFSecuritySetting Interface 15. RemoveSecurityWithPassword Description Remove PDF file’s security with password. Syntax HRESULT RemoveSecurityWithPassword ( BSTR password ); Parameters password [in] The password of PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 140
  • 141. PDF CMD SDK v. IPDFOpenOptionSetting This interface provides method for get or set open option of the PDF file. IPDFOpenOptionSetting interface should be retrieved through GetOpenOptionInterface method. 141
  • 142. PDF CMD SDK IPDFOpenOptionSetting Interface 1. Magnification Description Magnification property controls which predefined magnification level is in use. Syntax HRESULT get_Magnification ( MagnificationEnum *peMagnification ); HRESULT put_Magnification ( MagnificationEnum eMagnification ); Parameters peMagnification [out, retval] eMagnification [in] A MagnificationEnum variable specifies which predefined magnification level is in use. Default is Scale_Default. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of MagnificationEnum: enum { Scale_Default = 0, Scale_FitVisible = 1, Scale_FitWidth = 2, Scale_FitInWindow = 3, Scale_25 = 25, Scale_50 = 50, Scale_75 = 75, Scale_100 = 100, Scale_125 = 125, Scale_150 = 150, Scale_200 = 200, Scale_400 = 400, Scale_800 = 800, Scale_1600 = 1600 } MagnificationEnum; 142
  • 143. PDF CMD SDK IPDFOpenOptionSetting Interface 2. InitialPage Description InitialPage property controls the initial page to display when open the PDF file. Syntax HRESULT get_InitialPage ( long *peInitialPage ); HRESULT put_InitialPage ( long eInitialPage ); Parameters peInitialPage [out, retval] peInitialPage [in] A long variable specifies which page to display when open the PDF file. Default is 0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 143
  • 144. PDF CMD SDK IPDFOpenOptionSetting Interface 3. Layout Description Layout property controls the initial page layout. Syntax HRESULT get_Layout ( LayoutEnum *peLayout ); HRESULT put_Layout ( LayoutEnum eLayout ); Parameters peLayout [out, retval] eLayout [in] A LayoutEnum variable specifies the initial page layout. Default is Layout_Default. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of LayoutEnum: enum { Layout_Default = 0, Layout_SinglePage = 1, Layout_ContinuousPage = 2, Layout_FacingPage = 3, Layout_ContinuousFacing =4 } LayoutEnum; 144
  • 145. PDF CMD SDK IPDFOpenOptionSetting Interface 4. InitialWindow Description InitialWindow property controls the initial window’s size and position. Syntax HRESULT get_InitialWindow ( InitialWindowEnum *peInitialWindow ); HRESULT put_InitialWindow ( InitialWindowEnum eInitialWindow ); Parameters peInitialWindow [out, retval] eInitialWindow [in] A InitialWindowEnum variable specifies the initial window’s size and position. Default is IW_Default. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of InitialWindowEnum: enum { IW_Default = 0, IW_ResizeWindow = 1, IW_CenterWindow = 2, IW_FullScreen =4 } InitWindowEnum; 145
  • 146. PDF CMD SDK IPDFOpenOptionSetting Interface 5. NavigationPane Description NavigationPane property controls the initial navigation pane to show. Syntax HRESULT get_NavigationPane ( NavigationPaneEnum *peNavigationPane ); HRESULT put_NavigationPane ( NavigationPaneEnum eNavigationPane ); Parameters peNavigationPane [out, retval] eNavigationPane [in] A NavigationPaneEnum variable specifies the initial navigation pane to show. Default is NP_None. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of NavigationPaneEnum: enum { NP_None = 0, NP_Bookmark = 1, NP_Thumbnail = 2, NP_Comments =3 } NavigationPaneEnum; 146
  • 147. PDF CMD SDK IPDFOpenOptionSetting Interface 6. HideToolbar Description HideToolbar property controls whether to hide the toolbar when PDF file is opened. Syntax HRESULT get_HideToolbar ( VARIANT_BOOL *peHideToolbar ); HRESULT put_HideToolbar ( VARIANT_BOOL eHideToolbar ); Parameters peHideToolbar [out, retval] eHideToolbar [in] A boolean variable specifies whether to hide the toolbar when the PDF file is opened. TRUE = Hide the toolbar. FALSE = Do not hide the toolbar. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 147
  • 148. PDF CMD SDK IPDFOpenOptionSetting Interface 7. HideMenubar Description HideMeunbar property controls whether to hide the menubar when PDF file is opened. Syntax HRESULT get_HideMenubar ( VARIANT_BOOL *peHideMenubar ); HRESULT put_HideMenubar ( VARIANT_BOOL eHideMenubar ); Parameters peHideMenubar [out, retval] eHideToolbar [in] A boolean variable specifies whether to hide the menubar when the PDF file is opened. TRUE = Hide the menubar. FALSE = Do not hide the menubar. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 148
  • 149. PDF CMD SDK IPDFOpenOptionSetting Interface 8. HideControl Description HideControl property controls whether to hide the window control when PDF file is opened. Syntax HRESULT get_HideControl ( VARIANT_BOOL *peHideControl ); HRESULT put_HideControl ( VARIANT_BOOL eHideControl ); Parameters peHideControl [out, retval] eHideControl [in] A boolean variable specifies whether to hide the window control when the PDF file is opened. TRUE = Hide the window control. FALSE = Do not hide the window control. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 149
  • 150. PDF CMD SDK IPDFOpenOptionSetting Interface 9. ShowDocumentTitle Description ShowDocumentTitle property controls whether to display the document title on the window caption. Syntax HRESULT get_ShowDocumentTitle ( VARIANT_BOOL *peShowDocumentTitle ); HRESULT put_ShowDocumentTitle ( VARIANT_BOOL eShowDocumentTitle ); Parameters peShowDocumentTitle [out, retval] eShowDocumentTitle [in] A boolean variable specifies whether to display the document title on the window caption. TRUE = Show the document title. FALSE = Do not Show the document title. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 150
  • 151. PDF CMD SDK IPDFOpenOptionSetting Interface 10. LoadOpenSettingFromIni Description Load open setting from ini setting file. Syntax HRESULT LoadOpenSettingFromIni ( BSTR sIniPath ); Parameters sIniPath [in] Specifies ini file path for opening option setting. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 151
  • 152. PDF CMD SDK vi. IPDFPageEdit Provide methods for general operation of a single page. Application should create IPDFPageEdit interface through CreatePageEditInterface method and release it interface after using. 152
  • 153. PDF CMD SDK IPDFPageEdit Interface 1. CreateNewPage Description Create a new blank page. Syntax HRESULT CreateNewPage (long lAfterPageNum, long lWidth, long lHeight); Parameters lAfterPageNum [in] The page number after which the new page is inserted. The first page is 0. Use-1 to insert the new page at the beginning of a document. lWidth [in] Page’s width. lHeight [in] Page’s height. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 153
  • 154. PDF CMD SDK IPDFPageEdit Interface 2. Open Description Open a page of the specific PDF file. Syntax HRESULT Open ( long lPageNo ); Parameters lPageNo [in] Zero-based page number of the page you want to open. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 154
  • 155. PDF CMD SDK IPDFPageEdit Interface 3. GetPageWidthHeight Description Syntax HRESULT GetPageWidthHeight ( VARIANT_BOOL bMarkedAreaOnly, long *plWidth, long *plHeight ); Parameters bMarkedAreaOnly [in] Specifies whether to get the width and height of the marked area only. plWidth [out, retval] A pointer to a long variable specifies the page’s width. plHeight [out, retval] A pointer to a long variable specifies the page’s height. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks This method could only be called after having opened or created a page. 155
  • 156. PDF CMD SDK IPDFPageEdit Interface 4. Delete Description Delete a specific page. Syntax HRESULT Delete ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks If you have deleted a page, you can not do any other operations to that deleted page! 156
  • 157. PDF CMD SDK IPDFPageEdit Interface 5. Rotate Description Rotate a page. Syntax HRESULT Rotate ( VARIANT_BOOL bClockwise ); Parameters bClockwise [in] Specifies how to rotate the page. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None. 157
  • 158. PDF CMD SDK IPDFPageEdit Interface 6. Crop Description Crop a page. Syntax HRESULT Crop ( double dLeft, double dTop, double dRight, double dBottom ); Parameters dLeft, dTop, dRight, dBottom [in] Crop rectangle. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 158
  • 159. PDF CMD SDK IPDFPageEdit Interface 7. Insert Description Insert another page after current page. Syntax HRESULT Insert ( IPDFPageEdit *piSrcPage ); Parameters piSrcPage [in] A pointer to a IPDFPageEdit interface specifies the page you want to insert after the current page. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 159
  • 160. PDF CMD SDK IPDFPageEdit Interface 8. Close Description Close IPDFPageEdit interface. Syntax HRESULT Close ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks You muse close IPDFPageEdit interface after using it. 160
  • 161. PDF CMD SDK IPDFPageEdit Interface 9. GetPageBitmap Description Convert one page of PDF file into bitmap. Syntax HRESULT GetPageBitmap ( float fScale, VARIANT_BOOL bMarkedAreaOnly, long * pHBitmap ); Parameters fScale [in] Scale number of bitmap. bMarkedAreaOnly [in] Whether to only convert marked area into bitmap. pHBitmap [out, retval] HBITMAP handle. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks After get HBITMAP handle, must use DeleteObject of Windows API to release memory. 161
  • 162. PDF CMD SDK vii. IPDFWatermarkInfo Provide methods to get or set general properties of watermark information. IPDFWatermarkInfo interface is the base interface of both IPDFTextWatermark and IPDFImageWatermark interfaces. So all the properties defined here also apply to the two derived interfaces. 162
  • 163. PDF CMD SDK IPDFWatermarkInfo Interface 1. Anchor Description Anchor property controls the anchor point of the watermark on the page. Syntax HRESULT get_Anchor ( AnchorEnum *peAnchor ); HRESULT get_Anchor ( AnchorEnum eAnchor ); Parameters peAnchor [out, retval] eAnchor [in] A AnchorEnum variable specifies the anchor point of the watermark on the page. Default is Anchor_LeftTop. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of AnchorEnum enum{ Anchor_PageCenter = 0, Anchor_LeftTop = 1, Anchor_RightTop = 2, Anchor_RightBottom = 3, Anchor_LeftBottom = 4, Anchor_TopEdgeCenter = 5, Anchor_RightEdgeCenter = 6, Anchor_BottomEdgeCenter = 7, Anchor_LeftEdgeCenter =8 } AnchorEnum; 163
  • 164. PDF CMD SDK IPDFWatermarkInfo Interface 2. Unit Description Unit property controls the unit of watermark. Syntax HRESULT get_Unit ( UnitEnum *peUnit ); HRESULT put_Unit ( UnitEnum eUnit ); Parameters peUnit [out, retval] eUnit [in] A UnitEnum variable specifies the unit of the watermark on the page. Default is Unit_Inches. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of UintEnum enum{ Unit_Inches = 0, Unit_MM = 1, Unit_Points = 2 } UnitEnum; 164
  • 165. PDF CMD SDK IPDFWatermarkInfo Interface 3. XOffset Description XOffset property controls the distance in given unit between watermark and leftside of the page. Syntax HRESULT get_XOffset ( double *pdXOffset ); HRESULT put_XOffset ( double dXOffset ); Parameters pdXOffset [out, retval] dXOffset [in] A double specifies the distance in given unit between watermark and leftside of the page. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 165
  • 166. PDF CMD SDK IPDFWatermarkInfo Interface 4. YOffset Description YOffset property controls the distance in given unit between watermark and topside of the page. Syntax HRESULT get_YOffset ( double *pdYOffset ); HRESULT put_YOffset ( double dYOffset ); Parameters pdYOffset [out, retval] dYOffset [in] A double specifies the distance in given unit between watermark and topside of the page. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 166
  • 167. PDF CMD SDK IPDFWatermarkInfo Interface 5. CrossPageWatermark Description CrossPageWatermark property controls whether watermark should be displayed on 2 continuous pages. Syntax HRESULT get_CrossPageWatermark ( VARIANT_BOOL *pbCrossPageWatermark ); HRESULT put_CrossPageWatermark ( VARIANT_BOOL bCrossPageWatermark ); Parameters pbCrossPageWatermark [out, retval] bCrossPageWatermark [in] A boolean variable specifies whether watermark should be displayed on 2 continuous pages. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 167
  • 168. PDF CMD SDK IPDFWatermarkInfo Interface 6. Binding Description Binding property controls which predefined cross page watermark position is in use. Syntax HRESULT get_Binding ( BindingEnum *peBinding ); HRESULT put_Binding ( BindingEnum eBinding ); Parameters peBinding [out, retval] eBinding [in] A BindingEnum variable specifies which predefined cross page watermark position is in use. Default is LEFT_BINDING. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of BindingEnum: enum { LEFT_BINDING = 0, RIGHT_BINDING = 1, TOP_BINDING =2 }; BindingEnum; For more information of every specific property or settings, please see “PDF Driver SDK” as a reference. 168
  • 169. PDF CMD SDK IPDFWatermarkInfo Interface 7. Clearence Description Get the margin between cross page watermark and the page edge. Syntax HRESULT get_Clearence ( double *pdClearence ); HRESULT put_Clearence ( double dClearence ); Parameters pdClearence [out, retval] dClearence [in] A double variable specifies the margin between cross page watermark and the page edge. Default is 0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 169
  • 170. PDF CMD SDK IPDFWatermarkInfo Interface 8. Position Description Position property controls the distance between cross page watermark and the page origin. Syntax HRESULT get_Position ( double *pdPosition ); HRESULT put_Position ( double dPosition ); Parameters pdClearence [out, retval] dClearence [in] A double variable specifies the distance between cross page watermark and the page origin. Default is 148. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 170
  • 171. PDF CMD SDK IPDFWatermarkInfo Interface 9. Duplex Description Duplex property controls whether to duplex printing with the correct cross page watermark on facing pages. Syntax HRESULT get_Duplex ( VARIANT_BOOL *pbDuplex ); HRESULT put_Duplex ( VARIANT_BOOL bDuplex ); Parameters pbDuplex [out, retval] bDuplex [in] A boolean variable specifies whether to duplex printing with the correct cross page watermark on facing pages. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 171
  • 172. PDF CMD SDK IPDFWatermarkInfo Interface 10. Angle Description Angle property controls the rotation angle of the watermark. Syntax HRESULT get_Angle ( long *psAngle ); HRESULT put_Angle ( long sAngle ); Parameters psAngle [out, retval] sAngle [in] A long variable specifies the rotation angle of the watermark. Default is 0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 172
  • 173. PDF CMD SDK IPDFWatermarkInfo Interface 11. Opacity Description Opacity property controls the opacity of the text watermark. Syntax HRESULT get_Opacity ( double *pdOpacity ); HRESULT put_Opacity ( double dOpacity ); Parameters pdOpacity [out, retval] dOpacity [in] A double variable specifies the opacity of the text watermark. Default is 100 – fully obscure the underline contents – no transprancy. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 173
  • 174. PDF CMD SDK IPDFWatermarkInfo Interface 12. Background Description Background property controls whether watermark is background of PDF file. Syntax HRESULT get_Background ( VARIANT_BOOL *bBackground ); HRESULT put_Background ( VARIANT_BOOL bBackground ); Parameters bBackground [out, retval] bBackground [in] A bool variable specifies whether watermark is background of PDF file. Default value is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 174
  • 175. PDF CMD SDK IPDFWatermarkInfo Interface 13. ShowOnScreen Description ShowOnScreen property controls whether watermark is showed on screen. Syntax HRESULT get_ShowOnScreen ( VARIANT_BOOL *bShowOnScreen ); HRESULT put_ShowOnScreen ( VARIANT_BOOL bShowOnScreen ); Parameters bShowOnScreen [out, retval] bShowOnScreen [in] A bool variable specifies whether watermark is showed on screen. Default value is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 175
  • 176. PDF CMD SDK IPDFWatermarkInfo Interface 14. ShowOnPrint Description ShowOnPrint property controls whether watermark is showed while printing. Syntax HRESULT get_ShowOnPrint ( VARIANT_BOOL *bShowOnPrint ); HRESULT put_ShowOnPrint ( VARIANT_BOOL bShowOnPrint ); Parameters bShowOnPrint [out, retval] bShowOnPrint [in] A bool variable specifies whether watermark is showed while printing. Default value is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 176
  • 177. PDF CMD SDK IPDFWatermarkInfo Interface 15. PageRange Description PageRange property controls page range of PDF file with watermark. Syntax HRESULT get_PageRange ( BSTR * psPageRange ); HRESULT put_PageRange ( BSTR sPageRange ); Parameters psPageRange [out, retval] sPageRange [in] A BSTR variable specifies page range of PDF file with watermark. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 177
  • 178. PDF CMD SDK IPDFWatermarkInfo Interface 16. EvenOdd Description EvenOdd property controls which even and/or odd pages of PDF file will have watermark. Syntax HRESULT get_EvenOdd (EvenOddRangeEnum * peEvenOdd ); HRESULT put_EvenOdd (EvenOddRangeEnum eEvenOdd ); Parameters peEvenOdd [out, retval] eEvenOdd [in] A EvenOddRangeEnum value recieves which even and/or odd pages of PDF file will have watermark. Default value is Range_EvenOdd. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Enum EvenOddRangeEnum { Range_EvenOdd = 0, Range_OddOnly = 1, Range_EvenOnly = 2 } EvenOddrangeEnum; 178
  • 179. PDF CMD SDK IPDFWatermarkInfo Interface 17. AddWatermark Description Add watermark to the PDF file. Syntax HRESULT AddWatermark ( void ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 179
  • 180. PDF CMD SDK IPDFWatermarkInfo Interface 18. Redo Description Redo operation of watermark. Syntax HRESULT Redo ( void ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 180
  • 181. PDF CMD SDK IPDFWatermarkInfo Interface 19. Undo Description Undo operation of watermark. Syntax HRESULT Undo ( void ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 181
  • 182. PDF CMD SDK viii. IPDFTextWatermark Provide methods for editing settings of text watermark. IPDFTextWatermark is derived from IPDFWatermarkInfo interface and should be create through CreateTextWatarmark method. 182
  • 183. PDF CMD SDK IPDFTextWatermark Interface 1. Text Description Text property controls the watermark text string. Syntax HRESULT get_Text ( BSTR *psText ); HRESULT put_Text ( BSTR sText ); Parameters psText [out, retval] sText [in] A BSTR variable specifies the watermark text string. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 183
  • 184. PDF CMD SDK IPDFTextWatermark Interface 2. TextFont Description TextFont the watermark text font. Syntax HRESULT get_TextFont ( BSTR *psTextFont ); HRESULT put_TextFont ( BSTR sTextFont ); Parameters psTextFont [out, retval] sTextFont [in] A BSTR variable specifies the watermark text font. Default is Arial. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 184
  • 185. PDF CMD SDK IPDFTextWatermark Interface 3. TextSize Description TextSize property controls the watermark text size. Syntax HRESULT get_TextSize ( long *psTextSize ); HRESULT put_TextSize ( long sTextSize ); Parameters psTextSize [out, retval] sTextSize [in] A long variable specifies the watermark text size. Default is 72. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 185
  • 186. PDF CMD SDK IPDFTextWatermark Interface 4. TextStyle Description TextStyle property controls the watermark text font style. Syntax HRESULT get_Text Style ( FontStyleEnum *peTextStyle ); HRESULT put_Text Style ( FontStyleEnum eTextStyle ); Parameters psText [out, retval] sText [in] A FontStyleEnum variable specifies the watermark text font style. Default is FS_Bold. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of FontStyleEnum: enum { FS_Normal = 0, FS_Bold = 1, FS_Italic = 2, FS_BoldItalic= 3 } FontStyleEnum; 186
  • 187. PDF CMD SDK IPDFTextWatermark Interface 5. TextColorRed Description TextColorRed property controls the red portion of text watermark color. Syntax HRESULT get_TextColorRed ( long *psTextColorRed ); HRESULT put_TextColorRed ( long sTextColorRed ); Parameters psTextColorRed [out, retval] sTextColorRed [in] A long variable specifies the red portion of text watermark color. Default is 120. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 187
  • 188. PDF CMD SDK IPDFTextWatermark Interface 6. TextColorGreen Description TextColorGreen property controls the green portion of text watermark color. Syntax HRESULT get_TextColorGreen ( long *psTextColorGreen ); HRESULT put_TextColorGreen ( long sTextColorGreen ); Parameters psTextColorGreen [out, retval] sTextColorGreen [in] A long variable specifies the green portion of text watermark color. Default is 120. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 188
  • 189. PDF CMD SDK IPDFTextWatermark Interface 7. TextColorBlue Description TextColorBlue property controls the blue portion of text watermark color. Syntax HRESULT get_TextColorBlue ( long *psTextColorBlue ); HRESULT put_TextColorBlue ( long sTextColorBlue ); Parameters psTextColorBlue [out, retval] sTextColorBlue [in] A long variable specifies the blue portion of text watermark color. Default is 120. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 189
  • 190. PDF CMD SDK IPDFTextWatermark Interface 8. OutlineOnly Description OutlineOnly property controls whether to display the ouline of the text only. Syntax HRESULT get_OutlineOnly ( VARIANT_BOOL *pbOutlineOnly ); HRESULT put_OutlineOnly ( VARIANT_BOOL bOutlineOnly ); Parameters pbOutlineOnly [out, retval] bOutlineOnly [in] A boolean variable specifies whether to display the ouline of the text only. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 190
  • 191. PDF CMD SDK IPDFTextWatermark Interface 9. LoadSettingFromIni Description Set text watermark information from ini setting file. Syntax HRESULT LoadSettingFromIni ( BSTR sIniPath, BSTR sTitle ); Parameters sIniPath [in] Specifies ini file path. sTitle [in] Specifies watermark’s title in ini file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 191
  • 192. PDF CMD SDK ix. IPDFImageWatermark Provide methods to get or set properties of image or PDF watermark. IPDFImageWatermark is derived from IPDFWatermarkInfo interface and should be create through CreateImageWatarmark method. 192
  • 193. PDF CMD SDK IPDFImageWatermark Interface 1. filename Description filename property controls the full path of the file containing contents that is used as watermark. Syntax HRESULT get_filename ( BSTR *psFileName ); HRESULT get_filename ( BSTR sFileName ); Parameters psFileName [out, retval] sFileName [in] A BSTR variable specifies the full path of the file containing contents that is used as watermark. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 193
  • 194. PDF CMD SDK IPDFImageWatermark Interface 2. Width Description Width propert controls the width (in points) of the watermark bounding-box that is used to accept the image or PDF watermark. Syntax HRESULT get_Width ( double *pdWidth ); HRESULT put_Width ( double dWidth ); Parameters pdWidth [out, retval] dWidth [in] A double variable specifies the width (in points) of the watermark bounding-box that is used to accept the image or PDF watermark. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 194
  • 195. PDF CMD SDK IPDFImageWatermark Interface 3. Height Description Height property controls the height (in points) of the watermark bounding-box that is used to accept the image or PDF watermark. Syntax HRESULT get_Height ( double *pdHeight ); HRESULT put_Height ( double dHeight ); Parameters pdHeight [out, retval] dHeight [in] A double variable specifies the height (in points) of the watermark bounding-box that is used to accept the image or PDF watermark. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 195
  • 196. PDF CMD SDK IPDFImageWatermark Interface 4. KeepRatio Description KeepRatio property controls whether to keep the ratio of the image or PDF watermark. Syntax HRESULT get_KeepRaio ( VARIANT_BOOL *pbKeepRatio ); HRESULT put_KeepRaio ( VARIANT_BOOL bKeepRatio ); Parameters pbKeepRatio [out, retval] bKeepRatio [in] A boolean variable specifies whether to keep the ratio of the image or PDF watermark. TRUE = Image or PDF watermark is scaled and positioned without distortion. FALSE = Do not keep the ratio. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 196
  • 197. PDF CMD SDK IPDFImageWatermark Interface 5. CoverWholePage Description CoverWholePage property controls whether to display the watermark covering the whole page. Syntax HRESULT get_CoverWholePage ( VARIANT_BOOL *pbCoverWholePage ); HRESULT put_CoverWholePage ( VARIANT_BOOL bCoverWholePage ); Parameters pbCoverWholePage [out, retval] bCoverWholePage [in] A boolean variable specifies whether to display the watermark covering the whole page. TRUE = Display the watermark covering the whole page. FALSE = Do not display the watermark covering the whole page. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 197
  • 198. PDF CMD SDK IPDFImageWatermark Interface 6. PageIdentifier Description PageIdentifier property controls the number of the page used as watermark. Syntax HRESULT get_PageIdentifier ( long *plPageIdendifier ); HRESULT put_PageIdentifier ( long lPageIdendifier ); Parameters plPageIdendifier [out, retval] lPageIdendifier [in] A long variable specifies the number of the page used as watermark. Default is 0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 198
  • 199. PDF CMD SDK IPDFImageWatermark Interface 7. MarkedAreaOnly Description MarkedAreaOnly property controls whether to use the mared area as watermark only. Syntax HRESULT get_MarkedAreaOnly ( VARIANT_BOOL *pbMarkedAreaOnly ); HRESULT put_MarkedAreaOnly ( VARIANT_BOOL bMarkedAreaOnly ); Parameters pbMarkedAreaOnly [out, retval] bMarkedAreaOnly [in] A boolean variable specifies whether to use the mared area as watermark only. TRUE = Only use the mared area as watermark. FALSE = Use the whole page as watermark – including white area. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 199
  • 200. PDF CMD SDK IPDFImageWatermark Interface 8. LoadSettingFromIni Description Set image watermark information from ini setting file. Syntax HRESULT LoadSettingFromIni ( BSTR sIniPath, BSTR sTitle ); Parameters sIniPath [in] Specifies ini file path. sTitle [in] Specifies watermark’s title in ini file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 200
  • 201. PDF CMD SDK x. IPDFCombine Provide method to concatenate or overlay several PDF files into one PDF file. 201
  • 202. PDF CMD SDK IPDFCombine Interface 1. AddFile Description Add the specific file into the list of the files that you want to be combined. Syntax HRESULT AddFile ( BSTR sFileName, BSTR sPassword ); Parameters sFileName [in] Full path of the selected PDF file. sPassword [in] Password of the PDF file, could be NULL. Return Values S_OK The method succeeded. S_FALSE Failed. File specified by sFileName is not a PDF file. Remarks The PDF file will not be opened until actual combination is executed, such as Concate or Overlay. This method will return S_OK, even if the input password for the PDF file is invalid. 202
  • 203. PDF CMD SDK IPDFCombine Interface 2. Concate Description Combine several PDF files into one PDF file. Syntax HRESULT Concate ( BSTR sTargetFile ); Parameters sTargetFile [in] Full path of the resulting PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks You should call AddFile first, before using this method. Four events are fired during combination: StartJob, StartDoc, EndDoc, and EndJob. If the password input when the PDF file is added is invalid, QueryPassword and QueryContinue are also fired. 203
  • 204. PDF CMD SDK IPDFCombine Interface 3. Overlay Description Overlay several PDF files into one PDF file. Syntax HRESULT Overlay ( BSTR sTargetFile ); Parameters sTargetFile [in] Full path of the resulting PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks You should call AddFile first, before using this method. In addition, MergeOrder, Anchor, and MergeRepeat should be called if needed. Four events are fired during combination: StartJob, StartDoc, EndDoc, and EndJob. If the password input when the PDF file is added is invalid, QueryPassword and QueryContinue are also fired. 204
  • 205. PDF CMD SDK IPDFCombine Interface 4. IsCombining Description Whether another combination is in process. Syntax HRESULT IsCombining ( VARIANT_BOOL *pbIsCombining ); Parameters pbIsCombining [out, retval] Whether another combination process is in process. TRUE = PDF combination is in process. FALSE = No combination is in process. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should call this method to verify that no other combination is in process before use of Concate or Overlay method. Otherwise Concate or Overlay will fail and returen. 205
  • 206. PDF CMD SDK IPDFCombine Interface 5. StopCombining Description Stop the progressing combination. Syntax HRESULT StopCombining ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 206
  • 207. PDF CMD SDK IPDFCombine Interface 6. MergeOrder Description MergeOrder property controls which predefined MergeOrder for overlaying is in use Syntax HRESULT get_MergeOrder ( MergeOrderEnum *peMergeOrder ); HRESULT put_MergeOrder ( MergeOrderEnum eMergeOrder ); Parameters peMergeOrder [out, retval] eMergeOrder [in] A MergeOrderEnum specifies which predefined MergeOrder for overlaying is in use. Default is MO_Background. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of MergeOrderEnum: enum { MO_Background = 0, MO_Foreground =1 } MergeOrderEnum; 207
  • 208. PDF CMD SDK IPDFCombine Interface 7. Anchor Description Anchor property controls which predefined merge rules for overlaying is in use. Syntax HRESULT get_Anchor ( BSTR *psAnchor ); HRESULT put_Anchor ( BSTR sAnchor ); Parameters psAnchor [out, retval] sAnchor [in] A BSTR variable specifies which predefined merge rules for overlaying is in use. Default is “00”. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks For more information, please see “PDF Driver SDK” as a reference. 208
  • 209. PDF CMD SDK IPDFCombine Interface 8. MergeRepeat Description MergeRepeat property controls whether to merge pages with same page number only. Syntax HRESULT get_MergeRepeat ( VARIANT_BOOL *pbMergeRepeat ); HRESULT put_MergeRepeat ( VARIANT_BOOL pbMergeRepeat ); Parameters pbMergeRepeat [out, retval] bMergeRepeat [in] A boolean variable specifies whether to merge pages with same page number only. TRUE = The last page of the shorter document will be duplicated, and then merge with the pages of the longer document. FALSE = Only merge pages with page number. Default is FALSE. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 209
  • 210. PDF CMD SDK xi. _IPDFCombineEvents Through _IPDFCombineEvents interface, application can receive events sent by COM. 210
  • 211. PDF CMD SDK _IPDFCombineEvents Interface 1. StartJob Description Inform the application that file combination starts. Syntax void StartJob ( ); Parameters None Return Values None Remarks Fired by Concate and Overlay. 211
  • 212. PDF CMD SDK _IPDFCombineEvents Interface 2. StartDoc Description Inform the application that which PDF file is being processed.. Syntax void StartPage ( BSTR sFileName ); Parameters sFileName [in] Full file path name specifies which PDF file is being processed. Return Values None Remarks None 212
  • 213. PDF CMD SDK _IPDFCombineEvents Interface 3. EndDoc Description Inform the application that the specific file has been combined into the target PDF file. Syntax void EndDoc ( void ); Parameters None Return Values None Remarks Corresponding file path has been obtained by previous StartDoc. 213
  • 214. PDF CMD SDK _IPDFCombineEvents Interface 4. EndJob Description Inform the application, that the file combination has been finished. Syntax void EndDoc ( ); Parameters None Return Values None Remarks Corresponding file path has been obtained by previous StartDoc. 214
  • 215. PDF CMD SDK _IPDFCombineEvents Interface 5. Abort Description Inform the application that combination process has been terminated. Syntax void Abort ( ); Parameters None Return Values None Remarks When combination process is terminated, COM will send this event, except that the process is cancel by the application through StopCombining. Caution: This event is unsupported right now. 215
  • 216. PDF CMD SDK _IPDFCombineEvents Interface 6. QueryContinue Description Query the user whether to Continue. Syntax VARIANT_BOOL QueryContinue ( BSTR sFileName ); Parameters sFileName [in] Full file path name specifies which PDF file is being processed. Return Values TURE Skip current PDF file and continue the combination progress. FALSE Exit current file combination progress. Remarks If COM fails to open a PDF file, such as invalid password, it will send QueryPassword event three times to query the application for password. If the given password is still invalid after three times, COM will fire this event. 216
  • 217. PDF CMD SDK xii. _IPDFQueryPasswordEvents If COM opens a PDF file with password, it will query the application for the password through this interface. 217
  • 218. PDF CMD SDK _IPDFQueryPasswordEvents Interface 1. QueryPassword Description Query the user for password of the PDF file. Syntax BSTR QueryPassword ( BSTR sFileName ); Parameters sFileName [in] Full file path name specifies which PDF file is being processed. Return Values Password of the PDF file. If NULL returned, COM will stop querying the password immediately and return fail. Remarks If returned password is invalid, COM will fire this event three times. 218
  • 219. PDF CMD SDK _IPDFQueryPasswordEvents Interface 2. PasswordIncorrect Description Syntax void PasswordIncorrect ( BSTR sFileName ); Parameters sFileName [in] Full path of the PDF file that is being processed. Return Values None Remarks None 219
  • 220. PDF CMD SDK xiii. IPDFPackage Provide method to package several PDF files into one PDF file. 220
  • 221. PDF CMD SDK IPDFPackage Interface 1. AddField Description Add field title of package. Syntax HRESULT AddField ( PG_FieldTypeEnum eType, BSTR sName, VARIANT_BOOL bShow, long * index ); Parameters eType [in] The added Field’s type. sName [in] The added Field’s name. bShow [in] Whether the added Field shows. index [out, retval] Return the field’s index. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks The field of buildin can only be set field name, not be set filed value, that field value will auto generate according to package’s files.And the field of custom can be set both field name and value. Definition of PG_FieldTypeEnum: enum { PG_BuildInNameField = 0, PG_BuildInDescriptionField = 1, PG_BuildInSizeField = 2, PG_BuildInCreationDateField = 3, PG_BuildInModDateField = 4, PG_CustomTextField = 5, PG_CustomDateField = 6, PG_CustomNumberField =7 } PG_FieldTypeEnum; 221
  • 222. PDF CMD SDK IPDFPackage Interface 2. SetFieldValue Description Set package’s field value. Syntax HRESULT SetFieldValue ( long fileIndex, long fieldIndex, VARIANT * value ); Parameters fileIndex [in] File index. fieldIndex [in] Field index. value [in] The value. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks PG_CustomTextField value is of type VT_BSTR. PG_CustomDateField value is of type VT_DATE. PG_CustomNumberField value is of type VT_I4. 222
  • 223. PDF CMD SDK IPDFPackage Interface 3. SetSortField Description Specifies by which field.to sort the files. Syntax HRESULT SetSortField ( long fieldIndex, VARIANT_BOOL bAscending ); Parameters fieldIndex [in] Field index. bAscending [in] Specifies how to sort the files. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 223
  • 224. PDF CMD SDK IPDFPackage Interface 4. SetCover Description Set package’s cover. Syntax HRESULT SetCover ( BSTR file, BSTR password ); Parameters file [in] File to be set as package cover. password [in] Password of the file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Cover file must be PDF file. 224
  • 225. PDF CMD SDK IPDFPackage Interface 5. Pack Description Do package operation. Syntax HRESULT Pack ( BSTR dest, ); Parameters dest [in] The destination file for package. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 225
  • 226. PDF CMD SDK IPDFPackage Interface 6. AddFile Description Add package files. Syntax HRESULT AddFile ( BSTR file, BSTR name, BSTR desc, long * index ); Parameters file [in] File to be added. name [in] The name of the file. This value can be NULL. If not NULL, this value will used for buildinName field value. desc [in] The description of the file. This value can be NULL. If not NULL, this value will used for buildinDescription field value. index [out, retval] Return added file index. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Added file must be PDF file. 226
  • 227. PDF CMD SDK IPDFPackage Interface 7. ClearFields Description Clear fields setting. Syntax HRESULT ClearFields ( void ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 227
  • 228. PDF CMD SDK IPDFPackage Interface 8. ClearFiles Description Clear files that have been added. Syntax HRESULT ClearFiles ( void ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 228
  • 229. PDF CMD SDK III.PDFLibrarian PDFLibrarian component object provides interfaces to index and search indexed PDF documents. 229
  • 230. PDF CMD SDK i. IPDFLibrarian IPDFLibrarian is the default sink interface of PDFLibaraian component object interface. Provides method to initialize PDFLibrarian component object and create index/search interfaces. 230
  • 231. PDF CMD SDK IPDFLibrarian Interface 1. Initialize Description Initialize the PDFIndex/PDFSearch compenent. Syntax HRESULT Initialize ( BSTR sn, long reserved ); Parameters sn [in] Serial number. reserved [in] Reserved for Zeon Corporation. Must be set to 0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 231
  • 232. PDF CMD SDK IPDFLibrarian Interface 2. Uninitialize Description Close the PDFIndex/PDFSearch component. Syntax HRESULT Uninitialize ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks This method must be called before terminating the application. 232
  • 233. PDF CMD SDK IPDFLibrarian Interface 3. CreateIndexInterface Description Create IPDFIndex interface. Syntax HRESULT CreateIndexInterface (LPDISPATCH *piIndex ); Parameters piIndex [out, retval] A pointer to the returned IPDFIndex interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 233
  • 234. PDF CMD SDK IPDFLibrarian Interface 4. CreateSearchInterface Description Create IPDFSearch interface. Syntax HRESULT CreateSearchInterface (LPDISPATCH *piSearch ); Parameters piSearch [out, retval] A pointer to the returned IPDFSearch interface. NULL if create fails. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 234
  • 235. PDF CMD SDK ii. IPDFIndex Provides methods to index PDF documents. IPDFIndex interface should be create through CreateIndexInterface method. 235
  • 236. PDF CMD SDK IPDFIndex Interface 1. indexTitle Description indexTitle property controls title of the index. Syntax HRESULT get_indexTitle ( BSTR *psIndexTitle ); HRESULT put_indexTitle ( BSTR sIndexTitle ); Parameters psIndexTitle [out, retval] sIndexTitle [in] A BSTR variable specifies the title of the index. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 236
  • 237. PDF CMD SDK IPDFIndex Interface 2. indexDescription Description indexDescription property controls description of the index. Syntax HRESULT get_indexDescription ( BSTR *psIndexDescription ); HRESULT put_indexDescription ( BSTR sIndexDescription ); Parameters psIndexDescription [out, retval] sIndexDescription [in] A BSTR variable specifies the description of the index. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 237
  • 238. PDF CMD SDK IPDFIndex Interface 3. wordFinderVersion Description wordFinderVersion property controls the version of PDWordFinder. Syntax HRESULT get_wordFinderVersion ( long *plWordFinderVersion ); HRESULT put_wordFinderVersion ( long lWordFinderVersion ); Parameters plWordFinderVersion [out, retval] lWordFinderVersion [in] A long variable specifies the vesion of PDWordFinder. Default is 0 which means no care. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 238
  • 239. PDF CMD SDK IPDFIndex Interface 4. AddIncludeFile Description Add a file or a folder. Syntax HRESULT AddIncludeFile ( BSTR sFileName, VARIANT_BOOL bDirectory ); Parameters sFilename [in] Specifies full path of the file or folder. bDirectory [in] Specifies that sFileName is path of a file or a folder. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 239
  • 240. PDF CMD SDK IPDFIndex Interface 5. AddExcludeFile Description Exclude a file or a folder. Syntax HRESULT AddExcludeFile ( BSTR sFileName, VARIANT_BOOL bDirectory ); Parameters sFilename [in] Specifies full path of the file or folder. bDirectory [in] Specifies that sFileName is path of a file or a folder. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 240
  • 241. PDF CMD SDK IPDFIndex Interface 6. AddStopWord Description Add a StopWord. Syntax HRESULT AddStopWord ( BSTR sStopWord ); Parameters sStopWord [in] Specifies the StopWord string. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 241
  • 242. PDF CMD SDK IPDFIndex Interface 7. AddCustomField Description Add a customized field. Syntax HRESULT AddCustomField (ZPL_CustomFieldType eType, BSTR sFieldName ); Parameters eType [in] Specifies the type of the customized field. sFieldName [in] Name of the customized field. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of ZPL_CustomFieldType: enum { CFT_CustomStringField = 0, CFT_CustomIntField = 1, CFT_CustomDateField =2 }ZPL_CustomFieldType 242
  • 243. PDF CMD SDK IPDFIndex Interface 8. GetIncludeFileArray Description Get the array of the files or folders included. Syntax HRESULT GetIncludeFileArray ( VARIANT_BOOL bDirectory, VARIANT *paFileArray ); Parameters bDirectory [in] Specifies the returned array is of files or folders. psFileArray [out, retval] A pointer to a SafeArray variable of type BSTR containing the list of the files or folders included. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 243
  • 244. PDF CMD SDK IPDFIndex Interface 9. GetExcludeFileArray Description Get the array of the files or folders excluded. Syntax HRESULT GetExcludeFileArray ( VARIANT_BOOL bDirectory, VARIANT *paFileArray ); Parameters bDirectory [in] Specifies the returned array is of files or folders. psFileArray [out, retval] A pointer to a SafeArray variable of type BSTR containing the list of the files or folders excluded. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 244
  • 245. PDF CMD SDK IPDFIndex Interface 10. GetStopWordsArray Description Get the array of the stop words. Syntax HRESULT GetStopWordsArray ( VARIANT *paStopWordsArray ); Parameters psStopWordsArray [out, retval] A pointer to a SafeArray variable of type BSTR containing the list of the stop words. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 245
  • 246. PDF CMD SDK IPDFIndex Interface 11. GetCustomFieldArray Description Get the array of the customized fields. Syntax HRESULT GetCustomFieldArray ( ZPL_CustomFieldType eType, VARIANT *paCustomFieldArray ); Parameters eType [in] Specifies the type of field to retrieve. psCustomFieldArray [out, retval] A pointer to a SafeArray variable of type BSTR containing the list of the customized fields. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 246
  • 247. PDF CMD SDK IPDFIndex Interface 12. LoadIndex Description Load a index file. Syntax HRESULT LoadIndex ( BSTR sIndexFilePath, long lFlag ); Parameters sIndexFilePath [in] Full path of the index file. lFlag [in] Specifies the level of information acquired. 0:All the imofrmation; 1:Only the index title; 2:Index title plus include/exclude files/folders. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Application should firstly load the index file, and use GetIncludeFileArray, GetExcludeFileArray to get required information. 247
  • 248. PDF CMD SDK IPDFIndex Interface 13. BuildIndex Description Build a index file. Syntax HRESULT BuildIndex ( BSTR sIndexFile ); Parameters sIndexFile [in] Full path of the index file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 248
  • 249. PDF CMD SDK IPDFIndex Interface 14. RebuildIndex Description Rebuild a index file. Syntax HRESULT RebuildIndex ( BSTR sIndexFile ); Parameters sIndexFile [in] Full path of the index file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks The difference between BuildIndex and RebuildIndex is: BuildIndex: Only changes from that last build are taken into account. RebuildIndex: Build all the index. 249
  • 250. PDF CMD SDK IPDFIndex Interface 15. PurgeIndex Description Delete space used by index. Syntax HRESULT PurgeIndex ( BSTR sIndexFile ); Parameters sIndexFile [in] Full path of the index file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 250
  • 251. PDF CMD SDK IPDFIndex Interface 16. IsBuilding Description Check whether index building is in process. Syntax HRESULT IsBuilding ( VARIANT_BOOL *pbBuilding ); Parameters pbBuilding [out, retval] A pointer to a VARIANT_BOOL indicates whether index building is in process. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 251
  • 252. PDF CMD SDK IPDFIndex Interface 17. AbortBuilding Description Stop index building. Syntax HRESULT AbortBuilding ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 252
  • 253. PDF CMD SDK IPDFIndex Interface 18. GetCatalogStatus Description Get current status. Syntax HRESULT GetCatalogStatus ( VARIANT *psFilePaht, VARIANT *plPageCount, VARIANT *plPageNumber, ZPL_CatalogStatus *peStatus ); Parameters psFilePath [out, retval] A pointer to a VARIANT variable of type BSTR indicates the full path of the PDF file being built. plPageCount [out, retval] A pointer to a VARIANT variable of type long indicates the page number of the PDF file being processed. plPgeNumber [out, retval] A pointer to a VARIANT variable of type long indicates the number of page being processed. peStatus [out, retval] Return a pointer to a ZPL_CatalogStatus structure that indicates the status. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of ZPL_CatalogStatus enum { CS_CatalogIdle = 0, CS_CatalogReadying = 1, CS_CatalogSearchFile = 2, CS_CatalogReadDocInfo = 3, CS_CatalogHashing = 4, CS_CatalogWriteZpi = 5, CS_CatalogWriteUpdateFile = 6, CS_CatalogWriteMetadataFile = 7, CS_CatalogWriteInvf = 8, 253
  • 254. PDF CMD SDK CS_CatalogMergeInvf = 9, CS_CatalogStopping = 10, CS_CatalogCompleted = 11 } ZPL_CatalogStatus; 254
  • 255. PDF CMD SDK iii. IPDFSearch Provides method to search PDF documents. IPDFSearch interface should be create through CreateSearchInterface method. 255
  • 256. PDF CMD SDK IPDFSearch Interface 1. SetOption Description Set options for searching. Syntax HRESULT SetOption (ZPL_QueryType eType, VARIANT_BOOL bWholeWord, VARIANT_BOOL bCaseSensitive, VARIANT_BOOL bStemming, VARIANT_BOOL bQueryBookmark, VARIANT_BOOL bQueryComment ); Parameters eType [in] Specifies the search type. bWholeWord [in] Specifies whether to match the whole word. bCaseSensitive [in] Specifies whether to mach the word case-sensitively. bStemming [in] Specifies whether to include the etymon. bQueryBookmark [in] Specifies whether to search the bookmark. bQueryComment [in] Specifies whether to search the comment. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of ZPL_QueryType: enum { SQT_ExactPhrase = 0, SQT_AnyWords = 1, SQT_AllWords = 2, SQT_Boolean = 3 } ZPL_QueryType; 256
  • 257. PDF CMD SDK IPDFSearch Interface 2. AddCriteria Description Add additional criteria. Syntax HRESULT AddCriteria ( BSTR sKey, ZPL_MetaDataOP eOP, BSTR, sValue ); Parameters sKey [in] Case-sensitively BSTR value specifies the name of the field, predefined or customized. Predefined field: "Author"<==> MetaData::author "Title"<==> MetaData::title "Subject"<==> MetaData::subject "Keywords"<==> MetaData::keywords "Creator"<==> MetaData::creator "Producer"<==> MetaData::producer "CreationDate"<==> MetaData::dateCreation "ModDate"<==> MetaData::dateModified eOP [in] Specify the operator on the metadata. string type supports: include“=” exclude“!=” int and data type support: less than“<” equal“=” unequal“!=” greater than“>” sValue [in] Specify the value of the field. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks 257
  • 258. PDF CMD SDK Definition of ZPL_MetaDAtaOP: enum { OP_Less = 0, OP_Equal = 1, OP_Include = 1, OP_Unequal = 2, OP_Exclude = 2, OP_More =3 } ZPL_MetaDataOP; 258
  • 259. PDF CMD SDK IPDFSearch Interface 3. SearchIndex Description Search the index file. Syntax HRESULT SearchIndex ( BSTR sIndexFile, BSTR sPhrase ); Parameters sIndexFile [in] Full path of the index file. sPhrase [in] The phrase to search for. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks FindWordInDoc will be fired during search. Also FindWordInBookmark/FindWorkInComment will be fired if bookmark/comment was included. 259
  • 260. PDF CMD SDK IPDFSearch Interface 4. AbortSearching Description Abort searching. Syntax HRESULT AbortSearching (VARIANT_BOOL bAbort ); Parameters bAbort [in] Whether to abort searching. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 260
  • 261. PDF CMD SDK iv. _IPDFSearchEvents Events that will be fired during search. 261
  • 262. PDF CMD SDK _IPDFSearchEvents Interface 1. FindWordInDoc Description Inform the application that the word has been found in the PDF document.. Syntax HRESULT FindWordInDoc ( BSTR sFilename, long lPageNo, long lWordNo, long lWordNum, VARIANT_BOOL bModified ); Parameters sFileName [in] Full path of the PDF file being searched. lPageNo [in] Zero-based number of the page being processed. lWordNo [in] Zero-based number of the word being processed. lWordNum [in] dscp bModified [in] Indicates that whether the PDF document has been modified since the last build of the index. Return Values VARIANT_TRUE Continue searching; VARIANT_FALSEStop searching. Remarks If the search result contains only file name, then lPageNo, lWordNo and lWordNum are all set to “-1”. 262
  • 263. PDF CMD SDK _IPDFSearchEvents Interface 2. FindWordInBookmark Description The word has been found in bookmarks. Syntax HRESULT FindWordInBookmark ( BSTR sFileName, VARIANT aPosition, VARIANT_BOOL bModified ); Parameters sFileName [in] Full path of the PDF document. sPostion [in] A SafeArray variable of type VT_I4 bModified [in] Indicates that whether the PDF document has been modified since the last build of the index. Return Values VARIANT_TRUE Continue searching; VARIANT_FALSEStop searching. Remarks None 263
  • 264. PDF CMD SDK _IPDFSearchEvents Interface 3. FindWordInComment Description The word has been found in comments. Syntax HRESULT FindWordInComment ( BSTR sFileName, long lPageNo, long lAnnotationNo, VARIANT_BOOL bModified ); Parameters sFileName [in] Full path of the PDF document. lPageNo [in] Zero-based number of the page. jlAnnotationNo [in] Zero-based index of the annotation in the page. bModified [in] Indicates that whether the PDF document has been modified since the last build of the index. Return Values VARIANT_TRUE Continue searching; VARIANT_FALSEStop searching. Remarks None 264
  • 265. PDF CMD SDK _IPDFSearchEvents Interface 4. StartSearch Description Search has been started. Syntax HRESULT StartSearch (VARIANT_BOOL bTrial ); Parameters bTrial [in] Whether it is trial version. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 265
  • 266. PDF CMD SDK IV. PDF2Image PDF2Image component object provides interfaces to convert PDF files to image files. 266
  • 267. PDF CMD SDK i. IPDF2Image IPDF2Image is the default sink interface of PDF2Image component object. Provides methods to initialize PDF2Image component object and convert PDF files to image files. 267
  • 268. PDF CMD SDK IPDF2Image Interface 1. Initialize Description Initialize the PDF2Image compenent. Syntax HRESULT Initialize ( BSTR sn, long reserved ); Parameters sn [in] Serial number. reserved [in] Reserved for Zeon Corporation. Must be set to 0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks PDF2Image must be initialized before invoking its method. 268
  • 269. PDF CMD SDK IPDF2Image Interface 2. Uninitialize Description Close the PDF2Image component. Syntax HRESULT Uninitialize ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks This method must be called before terminating the application. 269
  • 270. PDF CMD SDK IPDF2Image Interface 3. OpenFile Description Open a PDF file you want to convert to image file. Syntax HRESULT OpenFile ( VARIANT sFilePath, BSTR sOpenPassword ); Parameters sFilePath [in] Full path of the specific PDF file that you want to open. sOpenPassword [in] Password for opening the PDF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 270
  • 271. PDF CMD SDK IPDF2Image Interface 4. CloseFile Description Close the PDF file have been opened. Syntax HRESULT CloseFile ( ); Parameters None Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 271
  • 272. PDF CMD SDK IPDF2Image Interface 5. GetPageCount Description Get page count of the PDF file that has been opened. Syntax HRESULT GetPageCount ( long *plNum ); Parameters plNum [out, retval] Reveives page count. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 272
  • 273. PDF CMD SDK IPDF2Image Interface 6. SetScale Description Set the scale of Image file. Syntax HRESULT SetScale ( float scale, long dpi); Parameters scale [in] The scale of the image file you want to set, default is 100. dpi [in] The dpi of the image file you want to set, default is 96. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks SetScale and SetSize are two different methods to set the size of the image, invoke one of them will overwrite another setting. 273
  • 274. PDF CMD SDK IPDF2Image Interface 7. SetSize Description Set the size of the Image file. Syntax HRESULT SetSize ( long width, long height, VARIANT_BOOL bKeepRatio ); Parameters width [in] Width of the image file you want to set. height [in] Height of the image file you want to set. bkeepRatio [in] Whether keep ratio when convert to image file. If it is FALSE, the image will fill the whole rectangle,and xscale and yscale will not consistent. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks SetScale and SetSize are two different methods to set the size of the image, invoke one of them will overwrite another setting. 274
  • 275. PDF CMD SDK IPDF2Image Interface 8. PrintToBMP Description Convet the PDF file to BMP file. Syntax HRESULT PrintToBMP ( long pageno, BSTR imagefile, BPPEnum bitsPerPixel, long *pWidth, long *pHeight ); Parameters pageno [in] Page no. of the PDF file you want to print to bitmap file. imagefile [in] Full path of the bitmap file. bitsPerPixel [in] Set the quality of the HBitmap, have five formats, such as 1,4,8,16,24, default is BPP_24. pWidth [out, retval] Return the width of the BMP. pHeight [out, retval] Return the height of the BMP. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of BPPEnum: enum { BPP_1 = 1, BPP_4 = 4, BPP_8 = 8, BPP_16 = 16, BPP_24 = 24 } BPPEnum; Default is BPP_24. 275
  • 276. PDF CMD SDK IPDF2Image Interface 9. PrintToJPEG Description Covert the PDF file to JPEG file. Syntax HRESULT PrintToJPEG ( long pageno, BSTR imagefile, long quality, long *pWidth, long *pHeight ); Parameters pageno [in] Page no. of the PDF file you want to print to JPEG file. imagefile [in] Full path of the JPEG file will be printed. quality [in] Quality of the JPEG file you want to set, it’s value is between 1 – 100. pWidth [out, retval] Return the width of the JPEG. pHeight [out, retval] Return the height of the JPEG. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 276
  • 277. PDF CMD SDK IPDF2Image Interface 10. PrintToJPEG2000 Description Covert the PDF file to JPEG2000 file. Syntax HRESULT PrintToJPEG2000 ( long pageno, BSTR imagefile, long quality, long *pWidth, long *pHeight ); Parameters pageno [in] Page no. of the PDF file you want to print to JPEG2000 file. imagefile [in] Full path of the JPEG2000 file. quality [in] Quality of the JPEG2000 file you want to set, It’s value is between 1-100. pWidth [out, retval] Return the width of the JPEG2000. pHeight [out, retval] Return the Height of the JPEG2000. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 277
  • 278. PDF CMD SDK IPDF2Image Interface 11. PrintToTIFF Description Convert PDF file to TIFF file. Syntax HRESULT PrintToTIFF ( long pageno, BSTR imgfile,BPPEnum bitsPerPixel, TIFFCompressEnum comp_mode, long flag, ong *pWidth, long * pHeight ); Parameters pageno [in] Page no. of the PDF file you want to print to TIFF file. imgfile [in] Full path of the TIFF file will be printed. bitsPerPixel [in] The dpi of the TIFF file, support the format of 1,4,8 and 24. comp_mode [in] The compress mode that will be used when convert to TIFF file. flag [in] Reserved. pWidth [out, retval] Return the width of the TIFF file. pHeight [out, retval] Return the height of the TIFF file. Return Values None Remarks If it is color palette format (1,4or 8 bits), image is could not be too big , namely scale and dpi could not be set too large. Definition of TIFFCompressEnum: enum { TIFF_NO_COMPRESS = 1, TIFF_CCITT_G3 = 3, TIFF_CCITT_G4 = 4, TIFF_LZW = 5, TIFF_JPEG_24B = 7, TIFF_ZIP =8 278
  • 279. PDF CMD SDK } TIFFCompressEnum; Default is TIFF_CCITT_G3. 279
  • 280. PDF CMD SDK IPDF2Image Interface 12. PrintToMultiTIFF Description Convert PDF file to MultiTIFF file. Syntax HRESULT PrintToMultiTIFF ( BSTR pageRange, BSTR imgfile,BPPEnum bitsPerPixel, TIFFCompressEnum comp_mode, long flag, long *pWidth, long *pHeight ); Parameters pageRange [in] Page range of the PDF file you want to print to MultiTIFF file, the same as the pagerange of the watermark and print, (for example: 0, 3, 5,-7), when the pageRange if “”, all pages will be convert the MultiTIFF file, default is “”. imgfile [in] Full path of the MultiTIFF file will be printed. bitsPerPixe [in] The bpi of the MultiTIFF file, support the fomat of 1,4,8 and 24. comp_mode [in] The compress mode that will be used when convert to MultiTIFF file. flag [in] Reserved. pWidth [out, retval] Width of the MultiTIFF file. pHeight [out, retval] Height of the MultiTIFF file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks The Image is could not be too big, namely the scale and dpi could not be set too large. 280
  • 281. PDF CMD SDK IPDF2Image Interface 13. PrintToGIF Description Convert PDF file to 8 bits GIF file. Syntax HRESULT PrintToGIF ( long pageno, BSTR imgfile, long *pWidth, long *pHeight ); Parameters pageno [in] Page no. of the PDF file you want to print to GIF file. imgfile [in] Full path of the image file will be printed. pWidth [out, retval] Return the width of the GIF file. pHeight [out, retval] Return the height of the GIF file. Return Values None Remarks None 281
  • 282. PDF CMD SDK IPDF2Image Interface 14. PrintToHBitmap Description Convert PDF file to HBitmap file. Syntax HRESULT PrintToHBitmap ( long pageno, BPPEnum bitsPerPixel, long *pHBitmap ); Parameters pageno [in] Page no. of the PDF file you want to convert it to HBitmap file. bitsPerPixe [in] Set the quality of the HBitmap, have five formats, such as 1,4,8,16,24. pHBitmap [out, retval] return HBITMAP. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of BPPEnum: enum { BPP_1 = 1, BPP_4 = 4, BPP_8 = 8, BBP_16 = 16, BPP_24 = 24 } BPPEnum; Default is BPP_24. 282
  • 283. PDF CMD SDK IPDF2Image Interface 15. removeMargin Description removeMargin propert controls whether to remove the margin of the PDF file when convert it to image file. Syntax HRESULT get_removeMargin ( VARIANT_BOOL * pbRemoveMargin ); HRESULT set_removeMargin ( VARIANT_BOOL bRemoveMargin ); Parameters pbRemoveMargin [out, retval] bRemoveMargin [in] A boolean variable specifies whether to remove the margin of the PDF file when convert it to image file. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks None 283
  • 284. PDF CMD SDK IPDF2Image Interface 16. rotation Description rotation property controls the rotation of image file compare to the PDF file. Syntax HRESULT get_rotation ( RotationEnum *peRotation ); HRESULT put_rotation ( RotationEnum eRotation ); Parameters peRotation [out, retval] eRotation [in] A RotationEnum variable specifies rotation angle of the image file compare with the PDF file. Default is Rotate_0. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of RotationEnum: enum { Rotate_0 = 0, Rotate_90 = 90, Rotate_180 = 180, Rotate_270 = 270, Rotate_Neg_90 = -90, Rotate_Neg_180 = -180, Rotate_Neg_270 = -270 } RotationEnum; 284
  • 285. PDF CMD SDK IPDF2Image Interface 17. content Description content propert controls what content of the PDF file will be print to image file. Syntax HRESULT get_content (PrintContentEnum *pPrintContent ); HRESULT get_content (PrintContentEnum PrintContent ); Parameters pPrintContent [out, retval] PrintContent [in] A PrintContentEnum variable specifies which contents of the PDF file will be printed to image file. Default is PC_ContentAndForm. Return Values S_OK The method succeeded. Others Failed, return error information through IErrorInfo Interface. Remarks Definition of PrintContentEnum: enum { PC_ContentAndForm = 0, PC_ContentOnly = 1, PC_FormOnly =2 } PrintContentEnum; 285
  • 286. PDF CMD SDK ii. _IPDF2ImageEvents Events that will be fired when opening a PDF file with password. 286
  • 287. PDF CMD SDK _IPDF2ImageEvents Interface 1. QueryPassword Description Query the user for password of the PDF file. Syntax BSTR QueryPassword ( BSTR sFileName ); Parameters sFileName [in] Full file path name specifies which PDF file is being processed. Return Values Password of the PDF file. If NULL returned, COM will stop querying the password immediately and return fail. Remarks If returned password is invalid, COM will fire this event three times. 287
  • 288. PDF CMD SDK _IPDF2ImageEvents Interface 2. PasswordIncorrect Description Syntax void PasswordIncorrect ( BSTR sFileName ); Parameters sFileName [in] Full path of the PDF file that is being processed. Return Values None Remarks None 288
  • 289. PDF CMD SDK  Index of Method Abort ...................................................................................................................42 AbortBuilding ....................................................................................................252 AbortSearching .................................................................................................260 AddCriteria........................................................................................................257 AddCustomDocInfo...................................................................................120, 121 AddCustomField ...............................................................................................242 AddExcludeFile .................................................................................................240 AddField....................................................................................................221, 222 AddFile......................................................................................................202, 226 AddIncludeFile ..................................................................................................239 AddPDFMark ....................................................................................................107 AddStopWord ...................................................................................................241 AddWatermark..................................................................................................179 AlwaysEmbedCount............................................................................................79 AlwaysEmbedFontName ....................................................................................80 Anchor ......................................................................................................163, 208 Angle.................................................................................................................172 Author ...............................................................................................................117 AutoBookmark ....................................................................................................85 AutoComment .....................................................................................................91 AutoCompression ...............................................................................................57 AutoCompressionRate........................................................................................58 Avort .................................................................................................................215 Background.......................................................................................................174 Binding..............................................................................................................168 BuildIndex .........................................................................................................248 canContentAccessForVisuallyImpaired ............................................................133 canContentCopyAndExtraction .........................................................................132 canCopy............................................................................................................130 canModify .........................................................................................................131 canPrint.....................................................................................................128, 129 changesAllowed................................................................................................135 Clearence .........................................................................................................169 ClearFields........................................................................................................227 ClearFiles..........................................................................................................228 Close.........................................................................................................104, 160 CloseFile...........................................................................................................271 ColorCompressMethod .......................................................................................60 ColorReSampleMethod.......................................................................................62 ColorReSampleResolution..................................................................................63 Compatible....................................................................................................53, 99 CompressColor ...................................................................................................59 CompressGray....................................................................................................64 289
  • 290. PDF CMD SDK CompressMono...................................................................................................69 Concate ............................................................................................................203 content ..............................................................................................................285 Convert ...............................................................................................................24 ConvertTextBox ..................................................................................................90 ConvertWithIni ....................................................................................................29 CoverWholePage..............................................................................................197 CreateCombineInterface.....................................................................................97 CreateFileEditInterface .......................................................................................96 CreateImageWatermark....................................................................................109 CreateIndexInterface ........................................................................................233 CreateNewPage................................................................................................153 CreatePackageInterface .....................................................................................98 CreatePageEditInterface...................................................................................106 CreateSearchInterface......................................................................................234 CreateTextWatermark.......................................................................................108 Creator..............................................................................................................122 Crop ..................................................................................................................158 CrossPageWatermark.......................................................................................167 Delete ...............................................................................................................156 DoCrossDocuLink ...............................................................................................88 DoCrossRefLink..................................................................................................89 DoInternetLink.....................................................................................................87 DoNote................................................................................................................86 Duplex...............................................................................................................171 EmbedAllFonts....................................................................................................75 EnableAlwaysEmbed ..........................................................................................78 EnableNeverEmbed............................................................................................81 encryptionLevel.................................................................................................134 EndDoc .......................................................................................................41, 213 EndJob..............................................................................................................214 EndPage .............................................................................................................40 EvenOdd...........................................................................................................178 filename ............................................................................................................193 FindWordInBookmark .......................................................................................263 FindWordInComment........................................................................................264 FindWordInDoc.................................................................................................262 GetCatalogStatus..............................................................................................253 GetCompressionSettingInterface ........................................................................32 GetCustomDocInfo ...........................................................................................119 GetCustomDocInfoCount..................................................................................118 GetCustomFieldsArray......................................................................................246 GetDocInfoInterface..........................................................................................110 GetExcludeFileArray .........................................................................................244 GetFontEmbedSettingInterface...........................................................................33 GetGeneralSettingInterface ................................................................................31 290
  • 291. PDF CMD SDK GetIncludeFileArray ..........................................................................................243 GetOpenOptionInterface...................................................................................112 GetPageBitmap.................................................................................................161 GetPageCount ..................................................................................................272 GetPageNum ....................................................................................................105 GetPageWidthHeight ........................................................................................155 GetSecurityInterface .........................................................................................111 GetStopWordsArray..........................................................................................245 GetVolumeLeft ....................................................................................................36 GetVolumeLimit ..................................................................................................35 GetWordMacroSettingInterface...........................................................................34 GrayCompressMethod........................................................................................65 GrayReSampleMethod .......................................................................................67 GrayReSampleResolution ..................................................................................68 Height .........................................................................................................49, 195 HideControl.......................................................................................................149 HideMeunbar ....................................................................................................148 HideToolbar ......................................................................................................147 indexDescription ...............................................................................................237 indexTitle ..........................................................................................................236 Initialize............................................................................................... 94, 231, 268 Initialize...............................................................................................................21 InitialPage .........................................................................................................143 InitialWindow.....................................................................................................145 Insert.................................................................................................................159 IsBuilding ..........................................................................................................251 IsCombining......................................................................................................205 IsFileTypeSupported...........................................................................................23 KeepRatio .........................................................................................................196 Keyword............................................................................................................116 Layout ...............................................................................................................144 LoadDocInfoSettingFromIni ..............................................................................124 LoadIndex .........................................................................................................247 LoadOpenSettingFromIni..................................................................................151 LoadSecuritySettingFromIni..............................................................................139 LoadSettingFromIni...................................................................................191, 200 Magnification.....................................................................................................142 Margin.................................................................................................................47 MarkedAreaOnly ...............................................................................................199 MergeOrder ......................................................................................................207 MergeRepeat ....................................................................................................209 MonoCompressMethod.......................................................................................70 MonoReSampleMethod ......................................................................................72 MonoReSampleResolution .................................................................................73 NavigationPane.................................................................................................146 NeverEmbedCount .............................................................................................82 291
  • 292. PDF CMD SDK NeverEmbedFontName ......................................................................................83 NewPDF ...........................................................................................................102 Opacity..............................................................................................................173 Open .........................................................................................................101, 154 open_password.................................................................................................126 OpenFile ...........................................................................................................270 OptimizePDF ......................................................................................................55 Orientation ..........................................................................................................50 OutlineOnly .......................................................................................................190 Overlay .............................................................................................................204 owner_password...............................................................................................127 Pack..................................................................................................................225 PageIdentifier....................................................................................................198 PageRange.......................................................................................................177 PasswordIncorrect ....................................................................................219, 288 PirntToTIFF.......................................................................................................278 Position .............................................................................................................170 printingAllowed..................................................................................................136 PrintToBMP ......................................................................................................275 PrintToGIF ........................................................................................................281 PrintToHBitmap.................................................................................................282 PrintToJPEG.....................................................................................................276 PrintToJPEG2000 .............................................................................................277 PrintToMultiTIFF ...............................................................................................280 Producer ...........................................................................................................123 PurgeIndex .......................................................................................................250 QueryContinue..................................................................................................216 QueryPassword ........................................................................................218, 287 RebuildIndex.....................................................................................................249 Redo .................................................................................................................180 removeMargin ...................................................................................................283 RemoveSecurity................................................................................................138 RemoveSecurityWithPassword.........................................................................140 ReSampleColor...................................................................................................61 ReSampleGray ...................................................................................................66 ReSampleMono ..................................................................................................71 Resolution...........................................................................................................51 RestoreDefaultSettings .......................................................................................26 Rotate ...............................................................................................................157 rotation..............................................................................................................284 Save..................................................................................................................103 Scale...................................................................................................................52 SearchIndex......................................................................................................259 SetCover...........................................................................................................224 SetExcelSHeetRange .........................................................................................28 SetOption..........................................................................................................256 292
  • 293. PDF CMD SDK SetScale ...........................................................................................................273 SetSecurity .......................................................................................................137 SetSize .............................................................................................................274 SetSortField ......................................................................................................223 SetTimeOut.........................................................................................................27 ShowDocumentTitle..........................................................................................150 ShowOnPrint.....................................................................................................176 ShowOnScreen.................................................................................................175 StandardPageSize ..............................................................................................45 StartDoc......................................................................................................38, 212 StartJob ............................................................................................................211 StartPage............................................................................................................39 StartSearch.......................................................................................................265 StopCombining .................................................................................................206 StopCreating.......................................................................................................25 Subject..............................................................................................................115 SubsetFont .........................................................................................................76 SubsetThreshold.................................................................................................77 Text...................................................................................................................183 TextColorBlue ...................................................................................................189 TextColorGreen ................................................................................................188 TextColorRed....................................................................................................187 TextFont............................................................................................................184 TextSize............................................................................................................185 TextStyle...........................................................................................................186 Title ...................................................................................................................114 Undo .................................................................................................................181 Uninitialize .................................................................................... 22, 95, 232, 269 Unit .............................................................................................................46, 164 UseCustomPageSize..........................................................................................44 ViewPDF.............................................................................................................54 Width...........................................................................................................48, 194 wordFinderVersion............................................................................................238 XOffset..............................................................................................................165 YOffset..............................................................................................................166 293
  • 294. PDF CMD SDK Copyright 2005- 2008, Zeon Corporation. All rights reserved. No part of this publication, as well as the software described in it, may be reproduced, stored, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of the publisher. The copyrighted software that accompanies this publication is licensed to the End User for use only in strict accordance with the End User License Agreement. Microsoft, MS-DOS and Windows are registered trademarks and ActiveX; Windows NT are trademarks of Microsoft Corporation in the U.S. and other countries. Apple, Macintosh and QuickTime are registered trademarks and TrueType is trademark of Apple Computer, Inc. Adobe, Acrobat and PostScript are trademarks of Adobe Systems Inc. Lotus Notes is a registered trademark of Lotus Development Corporation. Netscape and Netscape Navigator are trademarks of Netscape Communications Corporation. UNIX is a registered trademark in the U.S. and other countries, licensed exclusively through X/Open Company, Ltd. Pentium is a trademark of Intel Corporation. Other brand and product names are trademarks or registered trademarks of their respective holders. Zeon, DocuCom, PDF Reader (DocuReader), PDF Plus (DocuPlus), PDF Librarian (DocuShelf), PDF RIP, PDF Driver, PDF Office, Go PDFit, PDF Converter, PDFSHELL and their logos are trademarks of Zeon Corporation or its subsidiaries and may be registered in certain jurisdictions. This publication is furnished AS IS, is subject to change without notice, and should not be 294
  • 295. PDF CMD SDK construed as a commitment by Zeon Corporation. Zeon Corporation makes no warranty of any kind with respect to this publication, and expressly disclaims any and all warranties of fitness for particular purposes and non-infringement of third party rights. Visit us at: http://www.pdfwizard.com For help: http://www.pdfwizard.com/eng/qa/onlinesupport.aspx 295