PDF¶
pdf(src: Union[Path, str, IOBase], initial_page: Optional[int] = None, width: Optional[Union[int, str]] = '100%', height: Optional[Union[int, str]] = '70vh', style: Optional[dict[str, Any]] = None) -> Html
Render a PDF.
This currently uses the native browser PDF viewer, but may be replaced with a custom viewer.
Example
| PARAMETER | DESCRIPTION | 
|---|---|
| src | the URL of the pdf, a file-like object, or a pathlib.Path object | 
| initial_page | the page to open the pdf to.
only works if  | 
| width | the width of the pdf | 
| height | the height of the pdf. for a percentage
of the user's viewport, use a string like  | 
| style | a dictionary of CSS styles to apply to the pdf | 
| RETURNS | DESCRIPTION | 
|---|---|
| Html | 
 |