diff --git a/apps/OpenSign/src/components/pdf/PlaceholderType.js b/apps/OpenSign/src/components/pdf/PlaceholderType.js index d0113124f..6fe096844 100644 --- a/apps/OpenSign/src/components/pdf/PlaceholderType.js +++ b/apps/OpenSign/src/components/pdf/PlaceholderType.js @@ -31,7 +31,7 @@ function PlaceholderType(props) { const years = range(1990, getYear(new Date()) + 16, 1); const height = props.posHeight(props.pos, props.isSignYourself); const fontSize = - (props.pos.options?.fontSize || (height > 14 ? 12 : height / 2)) + "px"; + (props.pos.options?.fontSize || (height ? height - 4 : 12)) + "px"; const fontColor = props.pos.options?.fontColor || "black"; const months = [ "January", diff --git a/apps/OpenSign/src/constant/Utils.js b/apps/OpenSign/src/constant/Utils.js index 375c8d971..f3355609b 100644 --- a/apps/OpenSign/src/constant/Utils.js +++ b/apps/OpenSign/src/constant/Utils.js @@ -1290,7 +1290,7 @@ const calculateFontSize = ( widgetHeight ) => { const font = - position?.options?.fontSize || widgetHeight > 14 ? 12 : widgetHeight / 2; + position?.options?.fontSize || (widgetHeight ? widgetHeight / 2 : 12); if (!signyourself && position?.isMobile && position?.scale) { return font / position?.scale / containerScale; } else { @@ -1487,7 +1487,7 @@ export const multiSignEmbed = async ( position, containerScale, signyourself, - widgetHeight + position.Height ); parseInt(fontSize); let textContent; @@ -1662,7 +1662,7 @@ export const multiSignEmbed = async ( }); } const pdfBytes = await pdfDoc.saveAsBase64({ useObjectStreams: false }); - // console.log("pdf", pdfBytes); + //console.log("pdf", pdfBytes); return pdfBytes; };