~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to wxPython/wx/lib/pdfwin_old.py

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#----------------------------------------------------------------------
 
2
# Name:        wx.lib.pdfwin
 
3
# Purpose:     A class that allows the use of the Acrobat PDF reader
 
4
#              ActiveX control
 
5
#
 
6
# Author:      Robin Dunn
 
7
#
 
8
# Created:     22-March-2004
 
9
# RCS-ID:      $Id: pdfwin.py 49208 2007-10-18 00:40:21Z RD $
 
10
# Copyright:   (c) 2004 by Total Control Software
 
11
# Licence:     wxWindows license
 
12
#----------------------------------------------------------------------
 
13
 
 
14
import wx
 
15
 
 
16
#----------------------------------------------------------------------
 
17
 
 
18
_acroversion = None
 
19
 
 
20
def get_acroversion():
 
21
    " Return version of Adobe Acrobat executable or None"
 
22
    global _acroversion
 
23
    if _acroversion == None and wx.PlatformInfo[1] == 'wxMSW':
 
24
        import _winreg
 
25
        regKey = _winreg.HKEY_LOCAL_MACHINE
 
26
        acrokeys, acroversions = [], []
 
27
        try:
 
28
            adobesoft = _winreg.OpenKey(regKey, r'Software\Adobe')
 
29
        except WindowsError:
 
30
            regKey = _winreg.HKEY_CURRENT_USER
 
31
            adobesoft = _winreg.OpenKey(regKey, r'Software\Adobe')
 
32
            
 
33
        for index in range(_winreg.QueryInfoKey(adobesoft)[0]):
 
34
            key = _winreg.EnumKey(adobesoft, index)
 
35
            if "acrobat" in key.lower():
 
36
                acrokeys.append(_winreg.OpenKey(regKey, 'Software\\Adobe\\%s' % key))
 
37
        for acrokey in acrokeys:
 
38
            for index in range(_winreg.QueryInfoKey(acrokey)[0]):
 
39
                key = _winreg.EnumKey(acrokey, index)
 
40
                try:
 
41
                    acroversions.append(float(key))
 
42
                except:
 
43
                    pass
 
44
        acroversions.sort(reverse=True)
 
45
        if acroversions:
 
46
            _acroversion = acroversions[0]
 
47
    return _acroversion
 
48
            
 
49
 
 
50
#----------------------------------------------------------------------
 
51
 
 
52
# The ActiveX module from Acrobat 7.0 has changed and it seems to now
 
53
# require much more from the container than what our wx.activex module
 
54
# provides.  If we try to use it via wx.activex then Acrobat crashes.
 
55
# So instead we will use Internet Explorer (via the win32com modules
 
56
# so we can use better dynamic dispatch) and embed the Acrobat control
 
57
# within that.  Acrobat provides the IAcroAXDocShim COM class that is
 
58
# accessible via the IE window's Document property after a PDF file
 
59
# has been loaded.
 
60
#
 
61
# Details of the Acrobat reader methods can be found in
 
62
# http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/iac/IACOverview.pdf
 
63
# http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/iac/IACReference.pdf
 
64
#
 
65
# Co-ordinates passed as parameters are in points (1/72 inch).
 
66
 
 
67
 
 
68
if get_acroversion() >= 7.0:
 
69
 
 
70
    from wx.lib.activexwrapper import MakeActiveXClass
 
71
    import win32com.client.gencache
 
72
    _browserModule = win32com.client.gencache.EnsureModule(
 
73
        "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)
 
74
 
 
75
    class PDFWindowError(RuntimeError):
 
76
        def __init__(self):
 
77
            RuntimeError.__init__(self, "A PDF must be loaded before calling this method.")
 
78
            
 
79
 
 
80
    class PDFWindow(wx.Panel):
 
81
        def __init__(self, *args, **kw):
 
82
            wx.Panel.__init__(self, *args, **kw)
 
83
            
 
84
            # Make a new class that derives from the WebBrowser class
 
85
            # in the COM module imported above.  This class also
 
86
            # derives from wxWindow and implements the machinery
 
87
            # needed to integrate the two worlds.
 
88
            _WebBrowserClass = MakeActiveXClass(_browserModule.WebBrowser)
 
89
            self.ie = _WebBrowserClass(self, -1)
 
90
            sizer = wx.BoxSizer()
 
91
            sizer.Add(self.ie, 1, wx.EXPAND)
 
92
            self.SetSizer(sizer)
 
93
 
 
94
            
 
95
        def LoadFile(self, fileName):
 
96
            """
 
97
            Opens and displays the specified document within the browser.
 
98
            """
 
99
            if self.ie.Document:
 
100
                return self.ie.Document.LoadFile(fileName)
 
101
            else:
 
102
                self.ie.Navigate2(fileName)
 
103
                return True  # can we sense failure at this point?
 
104
            
 
105
        def GetVersions(self):
 
106
            """
 
107
            Deprecated: No longer available - do not use.
 
108
            """
 
109
            if self.ie.Document:
 
110
                return self.ie.Document.GetVersions()
 
111
            else:
 
112
                raise PDFWindowError()
 
113
            
 
114
        def Print(self):
 
115
            """
 
116
            Prints the document according to the specified options in a user dialog box.
 
117
            """
 
118
            if self.ie.Document:
 
119
                return self.ie.Document.Print()
 
120
            else:
 
121
                raise PDFWindowError()
 
122
            
 
123
        def goBackwardStack(self):
 
124
            """
 
125
            Goes to the previous view on the view stack, if it exists.
 
126
            """
 
127
            if self.ie.Document:
 
128
                return self.ie.Document.goBackwardStack()
 
129
            else:
 
130
                raise PDFWindowError()
 
131
 
 
132
        def goForwardStack(self):
 
133
            """
 
134
            Goes to the next view on the view stack, if it exists.
 
135
            """
 
136
            if self.ie.Document:
 
137
                return self.ie.Document.goForwardStack()
 
138
            else:
 
139
                raise PDFWindowError()
 
140
 
 
141
        def gotoFirstPage(self):
 
142
            """
 
143
            Goes to the first page in the document.
 
144
            """
 
145
            if self.ie.Document:
 
146
                return self.ie.Document.gotoFirstPage()
 
147
            else:
 
148
                raise PDFWindowError()
 
149
 
 
150
        def gotoLastPage(self):
 
151
            """
 
152
            Goes to the last page in the document.
 
153
            """
 
154
            if self.ie.Document:
 
155
                return self.ie.Document.gotoLastPage()
 
156
            else:
 
157
                raise PDFWindowError()
 
158
 
 
159
        def gotoNextPage(self):
 
160
            """
 
161
            Goes to the next page in the document, if it exists
 
162
            """
 
163
            if self.ie.Document:
 
164
                return self.ie.Document.gotoNextPage()
 
165
            else:
 
166
                raise PDFWindowError()
 
167
 
 
168
        def gotoPreviousPage(self):
 
169
            """
 
170
            Goes to the previous page in the document, if it exists.
 
171
            """
 
172
            if self.ie.Document:
 
173
                return self.ie.Document.gotoPreviousPage()
 
174
            else:
 
175
                raise PDFWindowError()
 
176
 
 
177
        def printAll(self):
 
178
            """
 
179
            Prints the entire document without displaying a user
 
180
            dialog box.  The current printer, page settings, and job
 
181
            settings are used.  This method returns immediately, even
 
182
            if the printing has not completed.
 
183
            """
 
184
            if self.ie.Document:
 
185
                return self.ie.Document.printAll()
 
186
            else:
 
187
                raise PDFWindowError()
 
188
 
 
189
        def printAllFit(self, shrinkToFit):
 
190
            """
 
191
            Prints the entire document without a user dialog box, and
 
192
            (if shrinkToFit) shrinks pages as needed to fit the
 
193
            imageable area of a page in the printer.
 
194
            """
 
195
            if self.ie.Document:
 
196
                return self.ie.Document.printAllFit(shrinkToFit)
 
197
            else:
 
198
                raise PDFWindowError()
 
199
 
 
200
        def printPages(self, from_, to):
 
201
            """
 
202
            Prints the specified pages without displaying a user dialog box.
 
203
            """
 
204
            if self.ie.Document:
 
205
                return self.ie.Document.printPages(from_, to)
 
206
            else:
 
207
                raise PDFWindowError()
 
208
 
 
209
        def printPagesFit(self, from_, to, shrinkToFit):
 
210
            """
 
211
            Prints the specified pages without displaying a user
 
212
            dialog box, and (if shrinkToFit) shrinks pages as needed
 
213
            to fit the imageable area of a page in the printer.
 
214
            """
 
215
            if self.ie.Document:
 
216
                return self.ie.Document.printPagesFit( from_, to, shrinkToFit)
 
217
            else:
 
218
                raise PDFWindowError()
 
219
 
 
220
        def printWithDialog(self):
 
221
            """
 
222
            Prints the document according to the specified options in
 
223
            a user dialog box. These options may include embedded
 
224
            printing and specifying which printer is to be used.
 
225
            
 
226
            NB. The page range in the dialog defaults to
 
227
            'From Page 1 to 1' - Use Print() above instead. (dfh) 
 
228
            """
 
229
            if self.ie.Document:
 
230
                return self.ie.Document.printWithDialog()
 
231
            else:
 
232
                raise PDFWindowError()
 
233
 
 
234
        def setCurrentHighlight(self, a, b, c, d):
 
235
            if self.ie.Document:
 
236
                return self.ie.Document.setCurrentHighlight(a, b, c, d)
 
237
            else:
 
238
                raise PDFWindowError()
 
239
 
 
240
        def setCurrentPage(self, npage):
 
241
            """
 
242
            Goes to the specified page in the document.  Maintains the
 
243
            current location within the page and zoom level.  npage is
 
244
            the page number of the destination page.  The first page
 
245
            in a document is page 0.
 
246
            
 
247
            ## Oh no it isn't! The first page is 1 (dfh)
 
248
            """
 
249
            if self.ie.Document:
 
250
                return self.ie.Document.setCurrentPage(npage)
 
251
            else:
 
252
                raise PDFWindowError()
 
253
 
 
254
        def setLayoutMode(self, layoutMode):
 
255
            """
 
256
            LayoutMode possible values:
 
257
            
 
258
                =================  ====================================
 
259
                'DontCare'         use the current user preference
 
260
                'SinglePage'       use single page mode (as in pre-Acrobat
 
261
                                   3.0 viewers)
 
262
                'OneColumn'        use one-column continuous mode
 
263
                'TwoColumnLeft'    use two-column continuous mode, first
 
264
                                   page on the left
 
265
                'TwoColumnRight'   use two-column continuous mode, first
 
266
                                   page on the right
 
267
                =================  ====================================
 
268
            """
 
269
            if self.ie.Document:
 
270
                return self.ie.Document.setLayoutMode(layoutMode)
 
271
            else:
 
272
                raise PDFWindowError()
 
273
 
 
274
        def setNamedDest(self, namedDest):
 
275
            """
 
276
            Changes the page view to the named destination in the specified string.
 
277
            """
 
278
            if self.ie.Document:
 
279
                return self.ie.Document.setNamedDest(namedDest)
 
280
            else:
 
281
                raise PDFWindowError()
 
282
 
 
283
        def setPageMode(self, pageMode):
 
284
            """
 
285
            Sets the page mode to display the document only, or to
 
286
            additionally display bookmarks or thumbnails.  pageMode =
 
287
            'none' or 'bookmarks' or 'thumbs'.
 
288
            
 
289
            ## NB.'thumbs' is case-sensitive, the other are not (dfh)
 
290
            """   
 
291
            if self.ie.Document:
 
292
                return self.ie.Document.setPageMode(pageMode)
 
293
            else:
 
294
                raise PDFWindowError()
 
295
 
 
296
        def setShowScrollbars(self, On):
 
297
            """
 
298
            Determines whether scrollbars will appear in the document
 
299
            view.
 
300
 
 
301
            ## NB. If scrollbars are off, the navigation tools disappear as well (dfh)
 
302
            """
 
303
            if self.ie.Document:
 
304
                return self.ie.Document.setShowScrollbars(On)
 
305
            else:
 
306
                raise PDFWindowError()
 
307
 
 
308
        def setShowToolbar(self, On):
 
309
            """
 
310
            Determines whether a toolbar will appear in the application.
 
311
            """
 
312
            if self.ie.Document:
 
313
                return self.ie.Document.setShowToolbar(On)
 
314
            else:
 
315
                raise PDFWindowError()
 
316
 
 
317
        def setView(self, viewMode):
 
318
            """
 
319
            Determines how the page will fit in the current view.
 
320
            viewMode possible values:
 
321
 
 
322
                ========  ==============================================
 
323
                'Fit'     fits whole page within the window both vertically
 
324
                          and horizontally.
 
325
                'FitH'    fits the width of the page within the window.
 
326
                'FitV'    fits the height of the page within the window.
 
327
                'FitB'    fits bounding box within the window both vertically
 
328
                          and horizontally.
 
329
                'FitBH'   fits the width of the bounding box within the window.
 
330
                'FitBV'   fits the height of the bounding box within the window.
 
331
                ========  ==============================================
 
332
            """
 
333
            if self.ie.Document:
 
334
                return self.ie.Document.setView(viewMode)
 
335
            else:
 
336
                raise PDFWindowError()
 
337
 
 
338
        def setViewRect(self, left, top, width, height):
 
339
            """
 
340
            Sets the view rectangle according to the specified coordinates.
 
341
 
 
342
            :param left:   The upper left horizontal coordinate.
 
343
            :param top:    The vertical coordinate in the upper left corner.
 
344
            :param width:  The horizontal width of the rectangle.
 
345
            :param height: The vertical height of the rectangle.
 
346
            """
 
347
            if self.ie.Document:
 
348
                return self.ie.Document.setViewRect(left, top, width, height)
 
349
            else:
 
350
                raise PDFWindowError()
 
351
 
 
352
        def setViewScroll(self, viewMode, offset):
 
353
            """
 
354
            Sets the view of a page according to the specified string.
 
355
            Depending on the view mode, the page is either scrolled to
 
356
            the right or scrolled down by the amount specified in
 
357
            offset. Possible values of viewMode are as in setView
 
358
            above. offset is the horizontal or vertical coordinate
 
359
            positioned either at the left or top edge.
 
360
            """    
 
361
            if self.ie.Document:
 
362
                return self.ie.Document.setViewScroll(viewMode, offset)
 
363
            else:
 
364
                raise PDFWindowError()
 
365
 
 
366
        def setZoom(self, percent):
 
367
            """
 
368
            Sets the magnification according to the specified value
 
369
            expressed as a percentage (float)
 
370
            """
 
371
            if self.ie.Document:
 
372
                return self.ie.Document.setZoom(percent)
 
373
            else:
 
374
                raise PDFWindowError()
 
375
 
 
376
        def setZoomScroll(self, percent, left, top):
 
377
            """
 
378
            Sets the magnification according to the specified value,
 
379
            and scrolls the page view both horizontally and vertically
 
380
            according to the specified amounts.
 
381
            
 
382
            :param left:  the horizontal coordinate positioned at the left edge.
 
383
            :param top:   the vertical coordinate positioned at the top edge.
 
384
            """
 
385
            if self.ie.Document:
 
386
                return self.ie.Document.setZoomScroll(percent, left, top)
 
387
            else:
 
388
                raise PDFWindowError()
 
389
 
 
390
        
 
391
 
 
392
elif get_acroversion() is not None:
 
393
    import wx.activex
 
394
 
 
395
    clsID = '{CA8A9780-280D-11CF-A24D-444553540000}'
 
396
    progID = 'AcroPDF.PDF.1'
 
397
 
 
398
 
 
399
    # Create eventTypes and event binders
 
400
    wxEVT_Error = wx.activex.RegisterActiveXEvent('OnError')
 
401
    wxEVT_Message = wx.activex.RegisterActiveXEvent('OnMessage')
 
402
 
 
403
    EVT_Error = wx.PyEventBinder(wxEVT_Error, 1)
 
404
    EVT_Message = wx.PyEventBinder(wxEVT_Message, 1)
 
405
 
 
406
 
 
407
    # Derive a new class from ActiveXWindow
 
408
    class PDFWindow(wx.activex.ActiveXWindow):
 
409
        def __init__(self, parent, ID=-1, pos=wx.DefaultPosition,
 
410
                     size=wx.DefaultSize, style=0, name='PDFWindow'):
 
411
            wx.activex.ActiveXWindow.__init__(self, parent,
 
412
                     wx.activex.CLSID('{CA8A9780-280D-11CF-A24D-444553540000}'),
 
413
                     ID, pos, size, style, name)
 
414
 
 
415
        # Methods exported by the ActiveX object
 
416
        def QueryInterface(self, riid):
 
417
            return self.CallAXMethod('QueryInterface', riid)
 
418
 
 
419
        def AddRef(self):
 
420
            return self.CallAXMethod('AddRef')
 
421
 
 
422
        def Release(self):
 
423
            return self.CallAXMethod('Release')
 
424
 
 
425
        def GetTypeInfoCount(self):
 
426
            return self.CallAXMethod('GetTypeInfoCount')
 
427
 
 
428
        def GetTypeInfo(self, itinfo, lcid):
 
429
            return self.CallAXMethod('GetTypeInfo', itinfo, lcid)
 
430
 
 
431
        def GetIDsOfNames(self, riid, rgszNames, cNames, lcid):
 
432
            return self.CallAXMethod('GetIDsOfNames', riid, rgszNames, cNames, lcid)
 
433
 
 
434
        def Invoke(self, dispidMember, riid, lcid, wFlags, pdispparams):
 
435
            return self.CallAXMethod('Invoke', dispidMember, riid, lcid, wFlags, pdispparams)
 
436
 
 
437
        def LoadFile(self, fileName):
 
438
            return self.CallAXMethod('LoadFile', fileName)
 
439
 
 
440
        def setShowToolbar(self, On):
 
441
            return self.CallAXMethod('setShowToolbar', On)
 
442
 
 
443
        def gotoFirstPage(self):
 
444
            return self.CallAXMethod('gotoFirstPage')
 
445
 
 
446
        def gotoLastPage(self):
 
447
            return self.CallAXMethod('gotoLastPage')
 
448
 
 
449
        def gotoNextPage(self):
 
450
            return self.CallAXMethod('gotoNextPage')
 
451
 
 
452
        def gotoPreviousPage(self):
 
453
            return self.CallAXMethod('gotoPreviousPage')
 
454
 
 
455
        def setCurrentPage(self, n):
 
456
            return self.CallAXMethod('setCurrentPage', n)
 
457
 
 
458
        def goForwardStack(self):
 
459
            return self.CallAXMethod('goForwardStack')
 
460
 
 
461
        def goBackwardStack(self):
 
462
            return self.CallAXMethod('goBackwardStack')
 
463
 
 
464
        def setPageMode(self, pageMode):
 
465
            return self.CallAXMethod('setPageMode', pageMode)
 
466
 
 
467
        def setLayoutMode(self, layoutMode):
 
468
            return self.CallAXMethod('setLayoutMode', layoutMode)
 
469
 
 
470
        def setNamedDest(self, namedDest):
 
471
            return self.CallAXMethod('setNamedDest', namedDest)
 
472
 
 
473
        def Print(self):
 
474
            return self.CallAXMethod('Print')
 
475
 
 
476
        def printWithDialog(self):
 
477
            return self.CallAXMethod('printWithDialog')
 
478
 
 
479
        def setZoom(self, percent):
 
480
            return self.CallAXMethod('setZoom', percent)
 
481
 
 
482
        def setZoomScroll(self, percent, left, top):
 
483
            return self.CallAXMethod('setZoomScroll', percent, left, top)
 
484
 
 
485
        def setView(self, viewMode):
 
486
            return self.CallAXMethod('setView', viewMode)
 
487
 
 
488
        def setViewScroll(self, viewMode, offset):
 
489
            return self.CallAXMethod('setViewScroll', viewMode, offset)
 
490
 
 
491
        def setViewRect(self, left, top, width, height):
 
492
            return self.CallAXMethod('setViewRect', left, top, width, height)
 
493
 
 
494
        def printPages(self, from_, to):
 
495
            return self.CallAXMethod('printPages', from_, to)
 
496
 
 
497
        def printPagesFit(self, from_, to, shrinkToFit):
 
498
            return self.CallAXMethod('printPagesFit', from_, to, shrinkToFit)
 
499
 
 
500
        def printAll(self):
 
501
            return self.CallAXMethod('printAll')
 
502
 
 
503
        def printAllFit(self, shrinkToFit):
 
504
            return self.CallAXMethod('printAllFit', shrinkToFit)
 
505
 
 
506
        def setShowScrollbars(self, On):
 
507
            return self.CallAXMethod('setShowScrollbars', On)
 
508
 
 
509
        def GetVersions(self):
 
510
            return self.CallAXMethod('GetVersions')
 
511
 
 
512
        def setCurrentHighlight(self, a, b, c, d):
 
513
            return self.CallAXMethod('setCurrentHighlight', a, b, c, d)
 
514
 
 
515
        def postMessage(self, strArray):
 
516
            return self.CallAXMethod('postMessage', strArray)
 
517
 
 
518
        # Getters, Setters and properties
 
519
        def _get_src(self):
 
520
            return self.GetAXProp('src')
 
521
        def _set_src(self, src):
 
522
            self.SetAXProp('src', src)
 
523
        src = property(_get_src, _set_src)
 
524
 
 
525
        def _get_messageHandler(self):
 
526
            return self.GetAXProp('messageHandler')
 
527
        def _set_messageHandler(self, messageHandler):
 
528
            self.SetAXProp('messageHandler', messageHandler)
 
529
        messagehandler = property(_get_messageHandler, _set_messageHandler)
 
530
 
 
531
 
 
532
#  PROPERTIES
 
533
#  --------------------
 
534
#  src
 
535
#      type:string  arg:string  canGet:True  canSet:True
 
536
#  
 
537
#  messagehandler
 
538
#      type:VT_VARIANT  arg:VT_VARIANT  canGet:True  canSet:True
 
539
#  
 
540
#  
 
541
#  
 
542
#  
 
543
#  METHODS
 
544
#  --------------------
 
545
#  QueryInterface
 
546
#      retType:  VT_VOID
 
547
#      params:
 
548
#          riid
 
549
#              in:True  out:False  optional:False  type:unsupported type 29
 
550
#          ppvObj
 
551
#              in:False  out:True  optional:False  type:unsupported type 26
 
552
#  
 
553
#  AddRef
 
554
#      retType:  int
 
555
#  
 
556
#  Release
 
557
#      retType:  int
 
558
#  
 
559
#  GetTypeInfoCount
 
560
#      retType:  VT_VOID
 
561
#      params:
 
562
#          pctinfo
 
563
#              in:False  out:True  optional:False  type:int
 
564
#  
 
565
#  GetTypeInfo
 
566
#      retType:  VT_VOID
 
567
#      params:
 
568
#          itinfo
 
569
#              in:True  out:False  optional:False  type:int
 
570
#          lcid
 
571
#              in:True  out:False  optional:False  type:int
 
572
#          pptinfo
 
573
#              in:False  out:True  optional:False  type:unsupported type 26
 
574
#  
 
575
#  GetIDsOfNames
 
576
#      retType:  VT_VOID
 
577
#      params:
 
578
#          riid
 
579
#              in:True  out:False  optional:False  type:unsupported type 29
 
580
#          rgszNames
 
581
#              in:True  out:False  optional:False  type:unsupported type 26
 
582
#          cNames
 
583
#              in:True  out:False  optional:False  type:int
 
584
#          lcid
 
585
#              in:True  out:False  optional:False  type:int
 
586
#          rgdispid
 
587
#              in:False  out:True  optional:False  type:int
 
588
#  
 
589
#  Invoke
 
590
#      retType:  VT_VOID
 
591
#      params:
 
592
#          dispidMember
 
593
#              in:True  out:False  optional:False  type:int
 
594
#          riid
 
595
#              in:True  out:False  optional:False  type:unsupported type 29
 
596
#          lcid
 
597
#              in:True  out:False  optional:False  type:int
 
598
#          wFlags
 
599
#              in:True  out:False  optional:False  type:int
 
600
#          pdispparams
 
601
#              in:True  out:False  optional:False  type:unsupported type 29
 
602
#          pvarResult
 
603
#              in:False  out:True  optional:False  type:VT_VARIANT
 
604
#          pexcepinfo
 
605
#              in:False  out:True  optional:False  type:unsupported type 29
 
606
#          puArgErr
 
607
#              in:False  out:True  optional:False  type:int
 
608
#  
 
609
#  LoadFile
 
610
#      retType:  bool
 
611
#      params:
 
612
#          fileName
 
613
#              in:True  out:False  optional:False  type:string
 
614
#  
 
615
#  setShowToolbar
 
616
#      retType:  VT_VOID
 
617
#      params:
 
618
#          On
 
619
#              in:True  out:False  optional:False  type:bool
 
620
#  
 
621
#  gotoFirstPage
 
622
#      retType:  VT_VOID
 
623
#  
 
624
#  gotoLastPage
 
625
#      retType:  VT_VOID
 
626
#  
 
627
#  gotoNextPage
 
628
#      retType:  VT_VOID
 
629
#  
 
630
#  gotoPreviousPage
 
631
#      retType:  VT_VOID
 
632
#  
 
633
#  setCurrentPage
 
634
#      retType:  VT_VOID
 
635
#      params:
 
636
#          n
 
637
#              in:True  out:False  optional:False  type:int
 
638
#  
 
639
#  goForwardStack
 
640
#      retType:  VT_VOID
 
641
#  
 
642
#  goBackwardStack
 
643
#      retType:  VT_VOID
 
644
#  
 
645
#  setPageMode
 
646
#      retType:  VT_VOID
 
647
#      params:
 
648
#          pageMode
 
649
#              in:True  out:False  optional:False  type:string
 
650
#  
 
651
#  setLayoutMode
 
652
#      retType:  VT_VOID
 
653
#      params:
 
654
#          layoutMode
 
655
#              in:True  out:False  optional:False  type:string
 
656
#  
 
657
#  setNamedDest
 
658
#      retType:  VT_VOID
 
659
#      params:
 
660
#          namedDest
 
661
#              in:True  out:False  optional:False  type:string
 
662
#  
 
663
#  Print
 
664
#      retType:  VT_VOID
 
665
#  
 
666
#  printWithDialog
 
667
#      retType:  VT_VOID
 
668
#  
 
669
#  setZoom
 
670
#      retType:  VT_VOID
 
671
#      params:
 
672
#          percent
 
673
#              in:True  out:False  optional:False  type:double
 
674
#  
 
675
#  setZoomScroll
 
676
#      retType:  VT_VOID
 
677
#      params:
 
678
#          percent
 
679
#              in:True  out:False  optional:False  type:double
 
680
#          left
 
681
#              in:True  out:False  optional:False  type:double
 
682
#          top
 
683
#              in:True  out:False  optional:False  type:double
 
684
#  
 
685
#  setView
 
686
#      retType:  VT_VOID
 
687
#      params:
 
688
#          viewMode
 
689
#              in:True  out:False  optional:False  type:string
 
690
#  
 
691
#  setViewScroll
 
692
#      retType:  VT_VOID
 
693
#      params:
 
694
#          viewMode
 
695
#              in:True  out:False  optional:False  type:string
 
696
#          offset
 
697
#              in:True  out:False  optional:False  type:double
 
698
#  
 
699
#  setViewRect
 
700
#      retType:  VT_VOID
 
701
#      params:
 
702
#          left
 
703
#              in:True  out:False  optional:False  type:double
 
704
#          top
 
705
#              in:True  out:False  optional:False  type:double
 
706
#          width
 
707
#              in:True  out:False  optional:False  type:double
 
708
#          height
 
709
#              in:True  out:False  optional:False  type:double
 
710
#  
 
711
#  printPages
 
712
#      retType:  VT_VOID
 
713
#      params:
 
714
#          from
 
715
#              in:True  out:False  optional:False  type:int
 
716
#          to
 
717
#              in:True  out:False  optional:False  type:int
 
718
#  
 
719
#  printPagesFit
 
720
#      retType:  VT_VOID
 
721
#      params:
 
722
#          from
 
723
#              in:True  out:False  optional:False  type:int
 
724
#          to
 
725
#              in:True  out:False  optional:False  type:int
 
726
#          shrinkToFit
 
727
#              in:True  out:False  optional:False  type:bool
 
728
#  
 
729
#  printAll
 
730
#      retType:  VT_VOID
 
731
#  
 
732
#  printAllFit
 
733
#      retType:  VT_VOID
 
734
#      params:
 
735
#          shrinkToFit
 
736
#              in:True  out:False  optional:False  type:bool
 
737
#  
 
738
#  setShowScrollbars
 
739
#      retType:  VT_VOID
 
740
#      params:
 
741
#          On
 
742
#              in:True  out:False  optional:False  type:bool
 
743
#  
 
744
#  GetVersions
 
745
#      retType:  VT_VARIANT
 
746
#  
 
747
#  setCurrentHightlight
 
748
#      retType:  VT_VOID
 
749
#      params:
 
750
#          a
 
751
#              in:True  out:False  optional:False  type:int
 
752
#          b
 
753
#              in:True  out:False  optional:False  type:int
 
754
#          c
 
755
#              in:True  out:False  optional:False  type:int
 
756
#          d
 
757
#              in:True  out:False  optional:False  type:int
 
758
#  
 
759
#  setCurrentHighlight
 
760
#      retType:  VT_VOID
 
761
#      params:
 
762
#          a
 
763
#              in:True  out:False  optional:False  type:int
 
764
#          b
 
765
#              in:True  out:False  optional:False  type:int
 
766
#          c
 
767
#              in:True  out:False  optional:False  type:int
 
768
#          d
 
769
#              in:True  out:False  optional:False  type:int
 
770
#  
 
771
#  postMessage
 
772
#      retType:  VT_VOID
 
773
#      params:
 
774
#          strArray
 
775
#              in:True  out:False  optional:False  type:VT_VARIANT
 
776
#  
 
777
#  
 
778
#  
 
779
#  
 
780
#  EVENTS
 
781
#  --------------------
 
782
#  Error
 
783
#      retType:  VT_VOID
 
784
#  
 
785
#  Message
 
786
#      retType:  VT_VOID
 
787
#  
 
788
#  
 
789
#  
 
790
#