mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bug-fix: always constrain the image width when exporting PDF
Otherwise, the exported PDF will have just part of the large image.
This commit is contained in:
parent
927c0f5c27
commit
c6986eeaf6
@ -194,6 +194,12 @@ void VNote::updateTemplate()
|
||||
// Shoudl not display scrollbar in PDF.
|
||||
cssStyle += "pre code { white-space: pre-wrap !important; "
|
||||
"word-break: break-all !important; }\n";
|
||||
if (!vconfig.getEnableImageConstraint()) {
|
||||
// Constain the image width by force in PDF, otherwise, the PDF will
|
||||
// be cut off.
|
||||
cssStyle += "img { max-width: 100% !important; height: auto !important; }\n";
|
||||
}
|
||||
|
||||
s_markdownTemplatePDF.replace(styleHolder, cssStyle);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user