panel
panel copied to clipboard
Large pdf improvements
Fixes #3696
The method used to be able to render large PDFs is the one described here. Which converts the base64 to a blob and inserted as an URL with URL.createObjectURL(blob);
in the Typescript Bokeh model.
I have also added start_page
to be able to set the start page when loading the PDF.
The pane is located in image.py
and not in markup.py
because it is a subclass of FileBase
, which is located in Image.py
.
Todo
- [ ] Confirm that this is the method to go forward with.
- [x] Write unit tests for this method.
- [x] Update existing unit tests to the method.
- [ ] Maybe add other URL parameters
navpanes=0&scrollbar=0&toolbar=0&zoom=100
? - [ ] If there is some way to cache the data of
convert_base64_to_blob
.
Codecov Report
Merging #3716 (f1fab92) into master (ff39f02) will increase coverage by
0.66%
. The diff coverage is95.74%
.
@@ Coverage Diff @@
## master #3716 +/- ##
==========================================
+ Coverage 83.56% 84.22% +0.66%
==========================================
Files 207 214 +7
Lines 29654 31033 +1379
==========================================
+ Hits 24779 26137 +1358
- Misses 4875 4896 +21
Flag | Coverage Δ | |
---|---|---|
ui-tests | 34.09% <85.10%> (+2.18%) |
:arrow_up: |
unitexamples-tests | 77.05% <46.80%> (-1.14%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
panel/tests/pane/test_image.py | 100.00% <ø> (ø) |
|
panel/pane/image.py | 80.28% <83.33%> (-1.50%) |
:arrow_down: |
panel/models/__init__.py | 100.00% <100.00%> (ø) |
|
panel/models/markup.py | 100.00% <100.00%> (ø) |
|
panel/tests/ui/widgets/test_image.py | 100.00% <100.00%> (ø) |
|
panel/tests/widgets/test_slider.py | 98.89% <0.00%> (-1.11%) |
:arrow_down: |
panel/config.py | 59.55% <0.00%> (-0.45%) |
:arrow_down: |
panel/tests/test_param.py | 99.67% <0.00%> (-0.21%) |
:arrow_down: |
panel/tests/test_depends.py | 100.00% <0.00%> (ø) |
|
... and 21 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more