mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Further adjusted linked image sizes on PDF export
Further fixes for #3120, Adds DOMPDF specific adjustments to prevent full width linked images being cut-off as per last tweak. This does not fix usage in smaller cases (tables) but tested on master DOMPDF branch shows that will likely be fixed in next DOMPDF upstream release. DOMPDF fixes would break WKHTMLTOPDF presentation so system updated to conditionally apply styles.
This commit is contained in:
@ -47,8 +47,15 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
@if($engine === \BookStack\Entities\Tools\PdfGenerator::ENGINE_DOMPDF)
|
||||
{{-- Fix for full width linked image sizes on DOMPDF --}}
|
||||
.page-content a > img {
|
||||
max-width: none;
|
||||
max-width: 700px;
|
||||
}
|
||||
{{-- Undoes the above for table images to prevent visually worse scenario, Awaiting next DOMPDF release for patch --}}
|
||||
.page-content td a > img {
|
||||
max-width: 100%;
|
||||
}
|
||||
@endif
|
||||
</style>
|
||||
@endif
|
@ -4,7 +4,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>@yield('title')</title>
|
||||
|
||||
@include('common.export-styles', ['format' => $format])
|
||||
@include('common.export-styles', ['format' => $format, 'engine' => $engine ?? ''])
|
||||
@include('common.export-custom-head')
|
||||
</head>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user