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
- Make correct px scaling (72/96) the default behavior
- Fixes incorrect page size measurements when using px unit with format strings
- A4 format now correctly measures as 793.71 x 1122.52 px instead of 446.46 x 631.42 px
- Add px_scaling_legacy hotfix for backward compatibility with old (incorrect) behavior
- Update documentation to reflect the change
* @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" or "l").<br />
180
180
* @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />
181
181
* Possible values are "pt" (points), "mm", "cm", "in", "px", "pc", "em" or "ex". Note that in order to get the correct scaling for "px"
182
-
* units, you need to enable the hotfix "px_scaling" by setting options.hotfixes = ["px_scaling"].
182
+
* units, the correct scaling (72/96) is now the default. For backward compatibility with the old incorrect scaling (96/72),
183
+
* you can enable the hotfix "px_scaling_legacy" by setting options.hotfixes = ["px_scaling_legacy"].
183
184
* @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />
184
185
* Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
185
186
* @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.
0 commit comments