Image Too large from post_content

WordPress
April 13, 2022 06:23:04
GAIDO
Topics: 2
Messages: 6
Hello,

All images included in the field post_content appear too large in the pdf.
April 13, 2022 06:28:06
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

You can try to set "image" width via CSS section as:

img {
width: 400px;
}

or if images has some class as:

.class {
width: 400px;
}

We would really appreciate your feedback at WordPress.org!
April 13, 2022 06:36:48
GAIDO
Topics: 2
Messages: 6
I already did this but no effect. CSS is never apply, color, size.. do I activate something ?
April 13, 2022 08:13:23
E2Pdf
Topics: 7
Messages: 3617
Support
Can you please attach screenshot how did you set "img" width with CSS section? Do you have "CSS Priority" checkbox "on"?

P.S. Currently it can accept only 1 level CSS as "tag" or ".class", exactly as on screenshot and not all CSS features supported however "img" tag with "width" is in the supported list.

We would really appreciate your feedback at WordPress.org!
April 13, 2022 08:29:25
GAIDO
Topics: 2
Messages: 6
Hi,

Thank for your answer.

Ok sorry, custom css works for "width", but the ratio width/height is not respected. The problem is general to all images. Why the format in web page is not respect in the pdf ?

See my attached files.
April 13, 2022 08:30:20
GAIDO
Topics: 2
Messages: 6
Image is the web HTML page and in attached the pdf exported.
April 13, 2022 09:24:53
E2Pdf
Topics: 7
Messages: 3617
Support
It looks like there is "width" and "height" attributes directly inside "HTML".

Can you try to modify CSS to:

img {
width: 400px;
height: auto;
}

P.S. PDF format by default doesn't support "HTML" and all "HTML" must be converted to PDF... We are continuously extending its support however there are still a lot of work to do.

We would really appreciate your feedback at WordPress.org!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.