Skip to content

Commit

Permalink
reorder readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Dec 8, 2024
1 parent 34f1a0d commit c559d98
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ You can see an [application](https://github.com/lfoppiano/structure-vision) in a
- The component is still in development, so expect some bugs and limitations
- The streamlit reload at each action may render slowly for complex PDF documents

## Caveats

Here some caveats to be aware of:
- It ss mandatory to specify a `width` to show PDF document on tabs and expanders, otherwise, the viewer will not be displayed on tabs not immediately visible.
- From version 0.0.16, the behavior for managing width and height has changed:
- If only the height is specified, the PDF document will be shown in proportion with the with proportional based on the PDF dimensions.
- The possibility to show a large view of half the PDF is not available anymore (let's face it, it was not very useful).
- If you need to use all the available space and limit the height, you can encapsulate the `pdf_viewer()` into a `st.component(width:...)` setting the width.
- The `legacy` rendering is not supported on Chrome, due to security reasons.



## Getting started

Expand All @@ -44,17 +55,6 @@ from streamlit_pdf_viewer import pdf_viewer
pdf_viewer("str, path or bytes")
```

### Caveats

Here some caveats to be aware of:
- It ss mandatory to specify a `width` to show PDF document on tabs and expanders, otherwise, the viewer will not be displayed on tabs not immediately visible.
- From version 0.0.16, the behavior for managing width and height has changed:
- If only the height is specified, the PDF document will be shown in proportion with the with proportional based on the PDF dimensions.
- The possibility to show a large view of half the PDF is not available anymore (let's face it, it was not very useful).
- If you need to use all the available space and limit the height, you can encapsulate the `pdf_viewer()` into a `st.component(width:...)` setting the width.
- The `legacy` rendering is not supported on Chrome, due to security reasons.


### Params

In the following table the list of parameters that can be provided to the `pdf_viewer` function:
Expand Down

0 comments on commit c559d98

Please sign in to comment.