A PDF formatter. To define the callables that compute the PDF representation of your objects, define a :meth:`_repr_pdf_` method or use the :meth:`for_type` or :meth:`for_type_by_name` methods to register functions that handle this. The return value of this formatter should be
| 862 | |
| 863 | |
| 864 | class PDFFormatter(BaseFormatter): |
| 865 | """A PDF formatter. |
| 866 | |
| 867 | To define the callables that compute the PDF representation of your |
| 868 | objects, define a :meth:`_repr_pdf_` method or use the :meth:`for_type` |
| 869 | or :meth:`for_type_by_name` methods to register functions that handle |
| 870 | this. |
| 871 | |
| 872 | The return value of this formatter should be raw PDF data, *not* |
| 873 | base64 encoded. |
| 874 | """ |
| 875 | format_type = Unicode('application/pdf') |
| 876 | |
| 877 | print_method = ObjectName('_repr_pdf_') |
| 878 | |
| 879 | _return_type = (bytes, str) |
| 880 | |
| 881 | class IPythonDisplayFormatter(BaseFormatter): |
| 882 | """An escape-hatch Formatter for objects that know how to display themselves. |
no outgoing calls