Renderer to display figures as static PDF images. This renderer requires either the kaleido package or the orca command-line utility and is compatible with JupyterLab and the LaTeX-based nbconvert export to PDF. mime type: 'application/pdf'
| 205 | |
| 206 | |
| 207 | class PdfRenderer(ImageRenderer): |
| 208 | """ |
| 209 | Renderer to display figures as static PDF images. This renderer requires |
| 210 | either the kaleido package or the orca command-line utility and is compatible |
| 211 | with JupyterLab and the LaTeX-based nbconvert export to PDF. |
| 212 | |
| 213 | mime type: 'application/pdf' |
| 214 | """ |
| 215 | |
| 216 | def __init__(self, width=None, height=None, scale=None, engine=None): |
| 217 | super(PdfRenderer, self).__init__( |
| 218 | mime_type="application/pdf", |
| 219 | b64_encode=True, |
| 220 | format="pdf", |
| 221 | width=width, |
| 222 | height=height, |
| 223 | scale=scale, |
| 224 | engine=engine, |
| 225 | ) |
| 226 | |
| 227 | |
| 228 | # HTML |