1 #----------------------------------------------------------------------
3 # Purpose: A class that allows the use of the Acrobat PSF reader
8 # Created: 22-March-2004
10 # Copyright: (c) 2004 by Total Control Software
11 # Licence: wxWindows license
12 #----------------------------------------------------------------------
13 # This module was generated by the wx.activex.GernerateAXModule class
14 # (See also the genaxmodule script.)
19 clsID = '{CA8A9780-280D-11CF-A24D-444553540000}'
20 progID = 'PDF.PdfCtrl.5'
24 # Derive a new class from ActiveXWindow
25 class PDFWindow(wx.activex.ActiveXWindow):
26 def __init__(self, parent, ID=-1, pos=wx.DefaultPosition,
27 size=wx.DefaultSize, style=0, name='PDFWindow'):
28 wx.activex.ActiveXWindow.__init__(self, parent,
29 wx.activex.CLSID('{CA8A9780-280D-11CF-A24D-444553540000}'),
30 ID, pos, size, style, name)
32 # Methods exported by the ActiveX object
33 def LoadFile(self, fileName):
34 return self.CallAXMethod('LoadFile', fileName)
36 def setShowToolbar(self, On):
37 return self.CallAXMethod('setShowToolbar', On)
39 def gotoFirstPage(self):
40 return self.CallAXMethod('gotoFirstPage')
42 def gotoLastPage(self):
43 return self.CallAXMethod('gotoLastPage')
45 def gotoNextPage(self):
46 return self.CallAXMethod('gotoNextPage')
48 def gotoPreviousPage(self):
49 return self.CallAXMethod('gotoPreviousPage')
51 def setCurrentPage(self, n):
52 return self.CallAXMethod('setCurrentPage', n)
54 def goForwardStack(self):
55 return self.CallAXMethod('goForwardStack')
57 def goBackwardStack(self):
58 return self.CallAXMethod('goBackwardStack')
60 def setPageMode(self, pageMode):
61 return self.CallAXMethod('setPageMode', pageMode)
63 def setLayoutMode(self, layoutMode):
64 return self.CallAXMethod('setLayoutMode', layoutMode)
66 def setNamedDest(self, namedDest):
67 return self.CallAXMethod('setNamedDest', namedDest)
70 return self.CallAXMethod('Print')
72 def printWithDialog(self):
73 return self.CallAXMethod('printWithDialog')
75 def setZoom(self, percent):
76 return self.CallAXMethod('setZoom', percent)
78 def setZoomScroll(self, percent, left, top):
79 return self.CallAXMethod('setZoomScroll', percent, left, top)
81 def setView(self, viewMode):
82 return self.CallAXMethod('setView', viewMode)
84 def setViewScroll(self, viewMode, offset):
85 return self.CallAXMethod('setViewScroll', viewMode, offset)
87 def setViewRect(self, left, top, width, height):
88 return self.CallAXMethod('setViewRect', left, top, width, height)
90 def printPages(self, from_, to):
91 return self.CallAXMethod('printPages', from_, to)
93 def printPagesFit(self, from_, to, shrinkToFit):
94 return self.CallAXMethod('printPagesFit', from_, to, shrinkToFit)
97 return self.CallAXMethod('printAll')
99 def printAllFit(self, shrinkToFit):
100 return self.CallAXMethod('printAllFit', shrinkToFit)
102 def setShowScrollbars(self, On):
103 return self.CallAXMethod('setShowScrollbars', On)
106 return self.CallAXMethod('AboutBox')
110 # --------------------
115 # --------------------
120 # in:False out:False optional:False type:string
126 # in:False out:False optional:False type:bool
144 # in:False out:False optional:False type:int
156 # in:False out:False optional:False type:string
162 # in:False out:False optional:False type:string
168 # in:False out:False optional:False type:string
180 # in:False out:False optional:False type:double
186 # in:False out:False optional:False type:double
188 # in:False out:False optional:False type:double
190 # in:False out:False optional:False type:double
196 # in:False out:False optional:False type:string
202 # in:False out:False optional:False type:string
204 # in:False out:False optional:False type:double
210 # in:False out:False optional:False type:double
212 # in:False out:False optional:False type:double
214 # in:False out:False optional:False type:double
216 # in:False out:False optional:False type:double
222 # in:False out:False optional:False type:int
224 # in:False out:False optional:False type:int
230 # in:False out:False optional:False type:int
232 # in:False out:False optional:False type:int
234 # in:False out:False optional:False type:bool
243 # in:False out:False optional:False type:bool
249 # in:False out:False optional:False type:bool
258 # --------------------