christopherdro / react-native-html-to-pdf

Convert html strings to PDF documents using React Native
MIT License
435 stars 269 forks source link

font size in rem or cm renders differently on iPad pro and iPhone #230

Closed euZebe closed 2 years ago

euZebe commented 3 years ago

Hi,

Here is a PDF which renders differently according to wheter it is generated from an iPad pro or an iPhone :

html-to-pdf render issue

Here the HTML source

<html>
<style>
  html {
    font-family: Arial;
    font-size: .3cm; 
  }
</style>
<body>
<h1>A title</h1>
<p>A paragraph which should be on a single row, considering the number of characters in it. But as you can see, it's too long on iPad Pro.</p>
</body>
</html>

Express the default font size in cm or px does not change anything.

How could I get the exact same rendering, regardless of the device from which it is generated?

vimalswaroopj commented 3 years ago

Are you able to use script tag for js in this?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

EEimer commented 2 years ago

Same problem here. iPad gets the same result with about 30% small font size.