Phoenix Logo

phoenix_title wx.lib.pdfwin.PDFWindow


class_hierarchy Class Hierarchy

Inheritance diagram for class PDFWindow:

super_classes Known Superclasses

wx.lib.activex.ActiveXCtrl


method_summary Methods Summary

__init__  
FreeDlls Unloads any DLLs that are no longer in use when all COM object instances are
GetVersions Deprecated: No longer available - do not use.
goBackwardStack Goes to the previous view on the view stack, if it exists.
goForwardStack Goes to the next view on the view stack, if it exists.
gotoFirstPage Goes to the first page in the document.
gotoLastPage Goes to the last page in the document.
gotoNextPage Goes to the next page in the document, if it exists
gotoPreviousPage Goes to the previous page in the document, if it exists.
LoadFile Opens and displays the specified document within the browser.
OnDestroyWindow  
Print Prints the document according to the specified options in a user dialog box.
printAll Prints the entire document without displaying a user
printAllFit Prints the entire document without a user dialog box, and
printPages Prints the specified pages without displaying a user dialog box.
printPagesFit Prints the specified pages without displaying a user
printWithDialog Prints the document according to the specified options in
setCurrentHighlight  
setCurrentPage Goes to the specified page in the document. Maintains the
setLayoutMode LayoutMode possible values
setNamedDest Changes the page view to the named destination in the specified string.
setPageMode Sets the page mode to display the document only, or to
setShowScrollbars Determines whether scrollbars will appear in the document
setShowToolbar Determines whether a toolbar will appear in the application.
setView Determines how the page will fit in the current view.
setViewRect Sets the view rectangle according to the specified coordinates.
setViewScroll Sets the view of a page according to the specified string.
setZoom Sets the magnification according to the specified value
setZoomScroll Sets the magnification according to the specified value,

api Class API



class PDFWindow(wx.lib.activex.ActiveXCtrl)

Methods



__init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name='PDFWindow')


FreeDlls(self)

Unloads any DLLs that are no longer in use when all COM object instances are released. This prevents the error ‘The instruction at “0x0700609c” referenced memory at “0x00000014”. The memory could not be read’ when application closes



GetVersions(self)

Deprecated: No longer available - do not use.



goBackwardStack(self)

Goes to the previous view on the view stack, if it exists.



goForwardStack(self)

Goes to the next view on the view stack, if it exists.



gotoFirstPage(self)

Goes to the first page in the document.



gotoLastPage(self)

Goes to the last page in the document.



gotoNextPage(self)

Goes to the next page in the document, if it exists



gotoPreviousPage(self)

Goes to the previous page in the document, if it exists.



LoadFile(self, fileName)

Opens and displays the specified document within the browser.



OnDestroyWindow(self, event)


Print(self)

Prints the document according to the specified options in a user dialog box.



printAll(self)

Prints the entire document without displaying a user dialog box. The current printer, page settings, and job settings are used. This method returns immediately, even if the printing has not completed.



printAllFit(self, shrinkToFit)

Prints the entire document without a user dialog box, and (if shrinkToFit) shrinks pages as needed to fit the imageable area of a page in the printer.



printPages(self, from_, to)

Prints the specified pages without displaying a user dialog box.



printPagesFit(self, from_, to, shrinkToFit)

Prints the specified pages without displaying a user dialog box, and (if shrinkToFit) shrinks pages as needed to fit the imageable area of a page in the printer.



printWithDialog(self)

Prints the document according to the specified options in a user dialog box. These options may include embedded printing and specifying which printer is to be used.

NB. The page range in the dialog defaults to ‘From Page 1 to 1’ - Use Print() above instead. (dfh)



setCurrentHighlight(self, a, b, c, d)


setCurrentPage(self, npage)

Goes to the specified page in the document. Maintains the current location within the page and zoom level. npage is the page number of the destination page. The first page in a document is page 0.

## Oh no it isn’t! The first page is 1 (dfh)



setLayoutMode(self, layoutMode)

LayoutMode possible values:

‘DontCare’ use the current user preference
‘SinglePage’ use single page mode (as in pre-Acrobat 3.0 viewers)
‘OneColumn’ use one-column continuous mode
‘TwoColumnLeft’ use two-column continuous mode, first page on the left
‘TwoColumnRight’ use two-column continuous mode, first page on the right


setNamedDest(self, namedDest)

Changes the page view to the named destination in the specified string.



setPageMode(self, pageMode)

Sets the page mode to display the document only, or to additionally display bookmarks or thumbnails. pageMode = ‘none’ or ‘bookmarks’ or ‘thumbs’.

## NB.’thumbs’ is case-sensitive, the other are not (dfh)



setShowScrollbars(self, On)

Determines whether scrollbars will appear in the document view.

## NB. If scrollbars are off, the navigation tools disappear as well (dfh)



setShowToolbar(self, On)

Determines whether a toolbar will appear in the application.



setView(self, viewMode)

Determines how the page will fit in the current view. viewMode possible values:

‘Fit’ fits whole page within the window both vertically and horizontally.
‘FitH’ fits the width of the page within the window.
‘FitV’ fits the height of the page within the window.
‘FitB’ fits bounding box within the window both vertically and horizontally.
‘FitBH’ fits the width of the bounding box within the window.
‘FitBV’ fits the height of the bounding box within the window.


setViewRect(self, left, top, width, height)

Sets the view rectangle according to the specified coordinates.

Parameters:
  • left – The upper left horizontal coordinate.
  • top – The vertical coordinate in the upper left corner.
  • width – The horizontal width of the rectangle.
  • height – The vertical height of the rectangle.


setViewScroll(self, viewMode, offset)

Sets the view of a page according to the specified string. Depending on the view mode, the page is either scrolled to the right or scrolled down by the amount specified in offset. Possible values of viewMode are as in setView above. offset is the horizontal or vertical coordinate positioned either at the left or top edge.



setZoom(self, percent)

Sets the magnification according to the specified value expressed as a percentage (float)



setZoomScroll(self, percent, left, top)

Sets the magnification according to the specified value, and scrolls the page view both horizontally and vertically according to the specified amounts.

Parameters:
  • left – the horizontal coordinate positioned at the left edge.
  • top – the vertical coordinate positioned at the top edge.