.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2017 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.pdfwin .. highlight:: python .. _wx.lib.pdfwin.PDFWindow: ========================================================================================================================================== |phoenix_title| **wx.lib.pdfwin.PDFWindow** ========================================================================================================================================== | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class PDFWindow:

| |super_classes| Known Superclasses ================================== :class:`wx.lib.activex.ActiveXCtrl` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.pdfwin.PDFWindow.__init__` :meth:`~wx.lib.pdfwin.PDFWindow.FreeDlls` Unloads any DLLs that are no longer in use when all COM object instances are :meth:`~wx.lib.pdfwin.PDFWindow.GetVersions` Deprecated: No longer available - do not use. :meth:`~wx.lib.pdfwin.PDFWindow.goBackwardStack` Goes to the previous view on the view stack, if it exists. :meth:`~wx.lib.pdfwin.PDFWindow.goForwardStack` Goes to the next view on the view stack, if it exists. :meth:`~wx.lib.pdfwin.PDFWindow.gotoFirstPage` Goes to the first page in the document. :meth:`~wx.lib.pdfwin.PDFWindow.gotoLastPage` Goes to the last page in the document. :meth:`~wx.lib.pdfwin.PDFWindow.gotoNextPage` Goes to the next page in the document, if it exists :meth:`~wx.lib.pdfwin.PDFWindow.gotoPreviousPage` Goes to the previous page in the document, if it exists. :meth:`~wx.lib.pdfwin.PDFWindow.LoadFile` Opens and displays the specified document within the browser. :meth:`~wx.lib.pdfwin.PDFWindow.OnDestroyWindow` :meth:`~wx.lib.pdfwin.PDFWindow.Print` Prints the document according to the specified options in a user dialog box. :meth:`~wx.lib.pdfwin.PDFWindow.printAll` Prints the entire document without displaying a user :meth:`~wx.lib.pdfwin.PDFWindow.printAllFit` Prints the entire document without a user dialog box, and :meth:`~wx.lib.pdfwin.PDFWindow.printPages` Prints the specified pages without displaying a user dialog box. :meth:`~wx.lib.pdfwin.PDFWindow.printPagesFit` Prints the specified pages without displaying a user :meth:`~wx.lib.pdfwin.PDFWindow.printWithDialog` Prints the document according to the specified options in :meth:`~wx.lib.pdfwin.PDFWindow.setCurrentHighlight` :meth:`~wx.lib.pdfwin.PDFWindow.setCurrentPage` Goes to the specified page in the document. Maintains the :meth:`~wx.lib.pdfwin.PDFWindow.setLayoutMode` LayoutMode possible values :meth:`~wx.lib.pdfwin.PDFWindow.setNamedDest` Changes the page view to the named destination in the specified string. :meth:`~wx.lib.pdfwin.PDFWindow.setPageMode` Sets the page mode to display the document only, or to :meth:`~wx.lib.pdfwin.PDFWindow.setShowScrollbars` Determines whether scrollbars will appear in the document :meth:`~wx.lib.pdfwin.PDFWindow.setShowToolbar` Determines whether a toolbar will appear in the application. :meth:`~wx.lib.pdfwin.PDFWindow.setView` Determines how the page will fit in the current view. :meth:`~wx.lib.pdfwin.PDFWindow.setViewRect` Sets the view rectangle according to the specified coordinates. :meth:`~wx.lib.pdfwin.PDFWindow.setViewScroll` Sets the view of a page according to the specified string. :meth:`~wx.lib.pdfwin.PDFWindow.setZoom` Sets the magnification according to the specified value :meth:`~wx.lib.pdfwin.PDFWindow.setZoomScroll` Sets the magnification according to the specified value, ================================================================================ ================================================================================ | |api| Class API =============== .. class:: PDFWindow(wx.lib.activex.ActiveXCtrl) .. method:: __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name='PDFWindow') .. method:: 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 .. method:: GetVersions(self) Deprecated: No longer available - do not use. .. method:: goBackwardStack(self) Goes to the previous view on the view stack, if it exists. .. method:: goForwardStack(self) Goes to the next view on the view stack, if it exists. .. method:: gotoFirstPage(self) Goes to the first page in the document. .. method:: gotoLastPage(self) Goes to the last page in the document. .. method:: gotoNextPage(self) Goes to the next page in the document, if it exists .. method:: gotoPreviousPage(self) Goes to the previous page in the document, if it exists. .. method:: LoadFile(self, fileName) Opens and displays the specified document within the browser. .. method:: OnDestroyWindow(self, event) .. method:: Print(self) Prints the document according to the specified options in a user dialog box. .. method:: 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. .. method:: 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. .. method:: printPages(self, from_, to) Prints the specified pages without displaying a user dialog box. .. method:: 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. .. method:: 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) .. method:: setCurrentHighlight(self, a, b, c, d) .. method:: 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) .. method:: 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 ================= ==================================== .. method:: setNamedDest(self, namedDest) Changes the page view to the named destination in the specified string. .. method:: 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) .. method:: setShowScrollbars(self, On) Determines whether scrollbars will appear in the document view. ## NB. If scrollbars are off, the navigation tools disappear as well (dfh) .. method:: setShowToolbar(self, On) Determines whether a toolbar will appear in the application. .. method:: 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. ======== ============================================== .. method:: setViewRect(self, left, top, width, height) Sets the view rectangle according to the specified coordinates. :param left: The upper left horizontal coordinate. :param top: The vertical coordinate in the upper left corner. :param width: The horizontal width of the rectangle. :param height: The vertical height of the rectangle. .. method:: 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. .. method:: setZoom(self, percent) Sets the magnification according to the specified value expressed as a percentage (float) .. method:: 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. :param left: the horizontal coordinate positioned at the left edge. :param top: the vertical coordinate positioned at the top edge.