Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS style background-image not always applied when exported to PDF #442

Open
SamOxyPlot opened this issue Jul 14, 2021 · 2 comments
Open
Labels

Comments

@SamOxyPlot
Copy link

Plugin dw2pdf version: 2021-02-07
Dokuwiki version: Release 2020-07-29 "Hogfather"
OS: Windows 2016

I'm currently using a self-written CSS plugin with a print.css file.

Prerequisites: an Dokuwiki page with following content (see atachment)

Dokuwiki syntax.txt

Print.css containts:

.image {
    background: url(/Wiki/lib/plugins/liscss/images/img.png) no-repeat;
    height: 20px;
    width: 20px;
    display: inline-block;
}

The page is rendered correctly in the browser even in 'print mode'.
However when exporting to PDF the image is only visible in the first DIV. Even in the table the DIV displays no image. In both situations the A element doesn't show the image.

I hope someone can help me find the cause of the problem.

@Klap-in
Copy link
Collaborator

Klap-in commented Oct 8, 2022

I guess it could be a limitation of the mpdf library. The supported css is described here: https://mpdf.github.io/css-stylesheets/supported-css.html

Sometime it has limitations, e.g. maybe the display: inline-block is a challenge for mpdf...?

@Klap-in
Copy link
Collaborator

Klap-in commented Jul 30, 2023

This might be related with #478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants