Literal blocks do not shink with newer versions of ReportLab
See original GitHub issueEven when running rst2pdf
with --fit-literal-mode=shrink
literal blocks to not shrink when they spill over the page edge.
It looks like in ReportLab the function _listWrapOn behaves differently now. There is a configuration parameter for reportlab listWrapOnFakeWidth
which needs to be set to False
for _listWrapOn
to return the correct width.
Current workaround, is to create reportlab_settings.py
in the same directory (or on your Python path) with the following:
listWrapOnFakeWidth = False
rst2pdf --version 0.93.dev-r0
reportlab.version ‘3.2.0’
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
ReportLab: How to auto resize text to fit block - Stack Overflow
I've been looking at the docs as described below and can't seem to find one. I've been trying to recursively resize the style.fontSize...
Read more >RML User Guide | ReportLab
ReportLab PLUS. ReportLab's solution solves several central problems that ebusinesses face in creating publishing caliber reports that are customized ...
Read more >rst2pdf/CHANGES.rst at main - GitHub
Migrate to the new format using python -m rst2pdf.style2yaml as per the "Migrating ... In any case, literal blocks are not supposed to...
Read more >rst2pdf - PyPI
Convert restructured text to PDF via reportlab. ... New in 0.10 ... Different modes to handle too-large literal blocks: overflow/truncate/shrink.
Read more >How to use rst2pdf
0 means no level starts in a new page. break_level=0 # How section breaks work. ... Currently, these semantics only work for literal...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We may be able to simply set
fakeWidth=False
inflowables.py:729
:Although, I am unsure what fakeWidth is for, and what impact this would have.
Fix in https://github.com/rst2pdf/rst2pdf/pull/703