Belle II Software development
PDF Class Reference

Public Member Functions

def __init__ (self, pdf, size=(600, 700))
 

Public Attributes

 pdf
 cached copy of the pdf filename
 
 size
 cached copy of the size
 

Protected Member Functions

def _repr_html_ (self)
 
def _repr_latex_ (self)
 

Detailed Description

Helper class to show a PDF file in a jupyter notebook.

Definition at line 24 of file analyse.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  pdf,
  size = (600, 700) 
)
Show a PDF file.
:param pdf: The filename of the PDF file.
:param size: The size to use.

Definition at line 29 of file analyse.py.

29 def __init__(self, pdf, size=(600, 700)):
30 """
31 Show a PDF file.
32 :param pdf: The filename of the PDF file.
33 :param size: The size to use.
34 """
35
36 self.pdf = pdf
37
38 self.size = size
39

Member Function Documentation

◆ _repr_html_()

def _repr_html_ (   self)
protected
HTML representation

Definition at line 40 of file analyse.py.

40 def _repr_html_(self):
41 """HTML representation"""
42 return f'<iframe src={self.pdf} width={self.size[0]} height={self.size[1]}></iframe>'
43

◆ _repr_latex_()

def _repr_latex_ (   self)
protected
LaTeX representation

Definition at line 44 of file analyse.py.

44 def _repr_latex_(self):
45 """LaTeX representation"""
46 return r'\includegraphics[width=1.0\textwidth]{{{0}}}'.format(self.pdf)
47
48

Member Data Documentation

◆ pdf

pdf

cached copy of the pdf filename

Definition at line 36 of file analyse.py.

◆ size

size

cached copy of the size

Definition at line 38 of file analyse.py.


The documentation for this class was generated from the following file: