You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am generating a PDF using HTML and CSS in .NET 8, with the majority of the content consisting of tables. Occasionally, certain rows display extra spacing, despite all rows having identical CSS. This issue can happen randomly to any row, and after generating the PDF 5-6 times, the extra space might disappear, but it’s inconsistent. I tested rendering the same HTML and CSS as a webpage, and everything displays correctly as expected.
I’ve attached screenshots for reference.
First Image is of PDF
This second image is of web page having the same html and css
The text was updated successfully, but these errors were encountered:
This project is a wrapper around wkhtmltopdf. Have you tried to run the HTML directly through wkhtmltopdf to see if the problem still persists? If so, this isn't an issue we are able to fix.
You might get wkhtmltopdf to work by playing with the settings. In particular --disable-smart-shrinking, --enable-smart-shrinking and the Zoom property. The Zoom property is added as a Rotativa property in version 1.4.0, the other properties can be added as CustomSwitches:
Wkhtmltopdf also doesn't work well with responsive CSS, you could try to eliminate that. You could also try to fix the height to a hard value. Please let us know your findings.
I tried everything that you mentioned but still the issue of random extra space did not get solved. I appreciate you taking the efforts to provide me with all the necessary links and solutions.
I am generating a PDF using HTML and CSS in .NET 8, with the majority of the content consisting of tables. Occasionally, certain rows display extra spacing, despite all rows having identical CSS. This issue can happen randomly to any row, and after generating the PDF 5-6 times, the extra space might disappear, but it’s inconsistent. I tested rendering the same HTML and CSS as a webpage, and everything displays correctly as expected.
I’ve attached screenshots for reference.
First Image is of PDF
This second image is of web page having the same html and css
The text was updated successfully, but these errors were encountered: