HTML field Auto Height Adjustment

October 23, 2025 14:06:03
LELF
Topics: 17
Messages: 86
Hello,

I have 2 html fields and I am unsure the height of each one, because I don't know how long the inventor notes will be. It is difficult to give it a specific height due to this and we want it to look nice. If it is shorter than shrink to fit the text size and if it is long and then expand, even if it means creating a new page.

So, is there a way auto adjust the height using CSS or JavaScript so it the field grows based on the number of words in the field. I know this is possible using CSS and JavaScript outside of E2PDF. Please let me know.

Thank you
October 23, 2025 14:09:12
LELF
Topics: 17
Messages: 86
Also, I don't want to auto fit the font, because if the notes are 1000 words then the font will be to small to read. I need the html field to adjust to the text length.

Thank you
October 23, 2025 14:18:42
E2Pdf
Topics: 7
Messages: 3617
Support
Hello,

Unfortunately, this is currently not possible, as all elements are using static and pre-defined positions at the moment.

The only possible approach is to place all content with dynamic sizing inside a single HTML object and use the feature that continues content onto new pages if it overflows.

However, for other elements, they should be placed either before the dynamic HTML block or on separate pages.

In our demo, you can see an example where dynamic content is properly split across pages: https://e2pdf.com/demo/wordpress

Please, see the screenshots attached.

Instead of using [e2pdf-wp key="post_content"], you should include all your content from the different HTML objects. For example:

<h1>Patient Information</h1>
<br>
<p>
{field:1}
</p>
<h1>Patient Information 2</h1>
<br>
<p>
{field:2}
</p>


We would really appreciate your feedback at WordPress.org!
October 23, 2025 14:27:19
LELF
Topics: 17
Messages: 86
Thank you, do you have plans to add this feature in the future?
October 23, 2025 14:29:10
E2Pdf
Topics: 7
Messages: 3617
Support
Yes, we are already working on a feature that will allow all elements to be relative to each other with dynamic sizes. However, due to the complexity of the task, we do not have an ETA yet.

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.