1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
|
#----------------------------------------------------------------------
# Name: wx.lib.pdfwin
# Purpose: A class that allows the use of the Acrobat PSF reader
# ActiveX control
#
# Author: Robin Dunn
#
# Created: 22-March-2004
# RCS-ID: $Id: pdfwin.py,v 1.1 2004/03/23 05:29:33 RD Exp $
# Copyright: (c) 2004 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------
# This module was generated by the wx.activex.GernerateAXModule class
# (See also the genaxmodule script.)
import wx
import wx.activex
clsID = '{CA8A9780-280D-11CF-A24D-444553540000}'
progID = 'PDF.PdfCtrl.5'
# Derive a new class from ActiveXWindow
class PDFWindow(wx.activex.ActiveXWindow):
def __init__(self, parent, ID=-1, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=0, name='PDFWindow'):
wx.activex.ActiveXWindow.__init__(self, parent,
wx.activex.CLSID('{CA8A9780-280D-11CF-A24D-444553540000}'),
ID, pos, size, style, name)
# Methods exported by the ActiveX object
def LoadFile(self, fileName):
return self.CallAXMethod('LoadFile', fileName)
def setShowToolbar(self, On):
return self.CallAXMethod('setShowToolbar', On)
def gotoFirstPage(self):
return self.CallAXMethod('gotoFirstPage')
def gotoLastPage(self):
return self.CallAXMethod('gotoLastPage')
def gotoNextPage(self):
return self.CallAXMethod('gotoNextPage')
def gotoPreviousPage(self):
return self.CallAXMethod('gotoPreviousPage')
def setCurrentPage(self, n):
return self.CallAXMethod('setCurrentPage', n)
def goForwardStack(self):
return self.CallAXMethod('goForwardStack')
def goBackwardStack(self):
return self.CallAXMethod('goBackwardStack')
def setPageMode(self, pageMode):
return self.CallAXMethod('setPageMode', pageMode)
def setLayoutMode(self, layoutMode):
return self.CallAXMethod('setLayoutMode', layoutMode)
def setNamedDest(self, namedDest):
return self.CallAXMethod('setNamedDest', namedDest)
def Print(self):
return self.CallAXMethod('Print')
def printWithDialog(self):
return self.CallAXMethod('printWithDialog')
def setZoom(self, percent):
return self.CallAXMethod('setZoom', percent)
def setZoomScroll(self, percent, left, top):
return self.CallAXMethod('setZoomScroll', percent, left, top)
def setView(self, viewMode):
return self.CallAXMethod('setView', viewMode)
def setViewScroll(self, viewMode, offset):
return self.CallAXMethod('setViewScroll', viewMode, offset)
def setViewRect(self, left, top, width, height):
return self.CallAXMethod('setViewRect', left, top, width, height)
def printPages(self, from_, to):
return self.CallAXMethod('printPages', from_, to)
def printPagesFit(self, from_, to, shrinkToFit):
return self.CallAXMethod('printPagesFit', from_, to, shrinkToFit)
def printAll(self):
return self.CallAXMethod('printAll')
def printAllFit(self, shrinkToFit):
return self.CallAXMethod('printAllFit', shrinkToFit)
def setShowScrollbars(self, On):
return self.CallAXMethod('setShowScrollbars', On)
def AboutBox(self):
return self.CallAXMethod('AboutBox')
# PROPERTIES
# --------------------
#
#
#
# METHODS
# --------------------
# LoadFile
# retType: bool
# params:
# fileName
# in:False out:False optional:False type:string
#
# setShowToolbar
# retType: VT_VOID
# params:
# On
# in:False out:False optional:False type:bool
#
# gotoFirstPage
# retType: VT_VOID
#
# gotoLastPage
# retType: VT_VOID
#
# gotoNextPage
# retType: VT_VOID
#
# gotoPreviousPage
# retType: VT_VOID
#
# setCurrentPage
# retType: VT_VOID
# params:
# n
# in:False out:False optional:False type:int
#
# goForwardStack
# retType: VT_VOID
#
# goBackwardStack
# retType: VT_VOID
#
# setPageMode
# retType: VT_VOID
# params:
# pageMode
# in:False out:False optional:False type:string
#
# setLayoutMode
# retType: VT_VOID
# params:
# layoutMode
# in:False out:False optional:False type:string
#
# setNamedDest
# retType: VT_VOID
# params:
# namedDest
# in:False out:False optional:False type:string
#
# Print
# retType: VT_VOID
#
# printWithDialog
# retType: VT_VOID
#
# setZoom
# retType: VT_VOID
# params:
# percent
# in:False out:False optional:False type:double
#
# setZoomScroll
# retType: VT_VOID
# params:
# percent
# in:False out:False optional:False type:double
# left
# in:False out:False optional:False type:double
# top
# in:False out:False optional:False type:double
#
# setView
# retType: VT_VOID
# params:
# viewMode
# in:False out:False optional:False type:string
#
# setViewScroll
# retType: VT_VOID
# params:
# viewMode
# in:False out:False optional:False type:string
# offset
# in:False out:False optional:False type:double
#
# setViewRect
# retType: VT_VOID
# params:
# left
# in:False out:False optional:False type:double
# top
# in:False out:False optional:False type:double
# width
# in:False out:False optional:False type:double
# height
# in:False out:False optional:False type:double
#
# printPages
# retType: VT_VOID
# params:
# from
# in:False out:False optional:False type:int
# to
# in:False out:False optional:False type:int
#
# printPagesFit
# retType: VT_VOID
# params:
# from
# in:False out:False optional:False type:int
# to
# in:False out:False optional:False type:int
# shrinkToFit
# in:False out:False optional:False type:bool
#
# printAll
# retType: VT_VOID
#
# printAllFit
# retType: VT_VOID
# params:
# shrinkToFit
# in:False out:False optional:False type:bool
#
# setShowScrollbars
# retType: VT_VOID
# params:
# On
# in:False out:False optional:False type:bool
#
# AboutBox
# retType: VT_VOID
#
#
#
#
# EVENTS
# --------------------
#
#
#
|