mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 03:50:06 +01:00
Trim Whitespace pdfviewer directory
This commit is contained in:
@@ -33,7 +33,7 @@ Further details on PyMuPDF can be found via http://pythonhosted.org/PyMuPDF
|
||||
|
||||
PyPDF2 provides a PdfFileReader class that is used to read the content stream of a PDF
|
||||
file which is subsequently rendered by :class:`~wx.lib.pdfviewer.viewer.pdfViewer` itself.
|
||||
Please note that this is not a complete implementation of the pdf specification and
|
||||
Please note that this is not a complete implementation of the pdf specification and
|
||||
will probably fail to display any random file you supply. However it does seem to
|
||||
satisfactorily render files typically produced by ReportLab using Western languages.
|
||||
The main limitation is that it doesn't currently support embedded fonts.
|
||||
@@ -51,13 +51,13 @@ Sample usage::
|
||||
|
||||
import wx
|
||||
import wx.lib.sized_controls as sc
|
||||
|
||||
|
||||
from wx.lib.pdfviewer import pdfViewer, pdfButtonPanel
|
||||
|
||||
|
||||
class PDFViewer(sc.SizedFrame):
|
||||
def __init__(self, parent, **kwds):
|
||||
super(PDFViewer, self).__init__(parent, **kwds)
|
||||
|
||||
|
||||
paneCont = self.GetContentsPane()
|
||||
self.buttonpanel = pdfButtonPanel(paneCont, wx.NewId(),
|
||||
wx.DefaultPosition, wx.DefaultSize, 0)
|
||||
@@ -66,9 +66,9 @@ Sample usage::
|
||||
wx.DefaultSize,
|
||||
wx.HSCROLL|wx.VSCROLL|wx.SUNKEN_BORDER)
|
||||
self.viewer.UsePrintDirect = False
|
||||
|
||||
|
||||
self.viewer.SetSizerProps(expand=True, proportion=1)
|
||||
|
||||
|
||||
# introduce buttonpanel and viewer to each other
|
||||
self.buttonpanel.viewer = self.viewer
|
||||
self.viewer.buttonpanel = self.buttonpanel
|
||||
@@ -77,14 +77,14 @@ Sample usage::
|
||||
if __name__ == '__main__':
|
||||
import wx.lib.mixins.inspection as WIT
|
||||
app = WIT.InspectableApp(redirect=False)
|
||||
|
||||
|
||||
|
||||
|
||||
pdfV = PDFViewer(None, size=(800, 600))
|
||||
pdfV.viewer.UsePrintDirect = False
|
||||
|
||||
|
||||
pdfV.viewer.LoadFile(r'a path to a .pdf file')
|
||||
pdfV.Show()
|
||||
|
||||
|
||||
app.MainLoop()
|
||||
|
||||
|
||||
@@ -101,14 +101,14 @@ Externally callable methods are:
|
||||
:meth:`~wx.lib.pdfviewer.viewer.pdfViewer.SetZoom`
|
||||
|
||||
:meth:`~wx.lib.pdfviewer.viewer.pdfViewer.GoPage`
|
||||
|
||||
|
||||
The viewer renders the pdf file content using Cairo if installed,
|
||||
otherwise :class:`wx.GraphicsContext` is used. Printing is achieved by writing
|
||||
directly to a :class:`wx.PrinterDC` and using :class:`wx.Printer`.
|
||||
|
||||
The icons used in :class:`~wx.lib.pdfviewer.buttonpanel.pdfButtonPanel` are Free Icons
|
||||
by Axialis Software: http://www.axialis.com. You can freely use them in any project,
|
||||
commercially or not, but you must keep the credits of the authors:
|
||||
commercially or not, but you must keep the credits of the authors:
|
||||
"Axialis Team", even if you modify them. See ./bitmaps/ReadMe.txt for further details.
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user