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
Hi,
We have an issue at the moment where we have a pdf template with form fields we use to customize the pdf with our data and print it. The results are great.
But sometimes the text we want to put in, is too much for the size of the form field and gets cut off. We tried to increate the size of the field and make it multiline, which works for the longer text, but fails for shorter text because we cannot set it to be aligned to the bottom and that makes the shorter text float in mid air, not where it's supposed to. I added some screenshots for clarification.
Is there a good way to deal with this (programmatically)?
Thanks,
Peter
The text was updated successfully, but these errors were encountered:
Hi @sampila,
sorry for the late reply.
I haven't tried to check the string length. The issue is that 30x i is smaller than 30x X, so exact numbers won't work in all cases.
Is there a way to detect the overflow?
Or simply set the style of the formfield to vertical align on bottom?
All fields get flattened, so it might also be done in the flattening operation later.
Hi @sampila,
another idea: is it possible to get the bounding box of a text element? I could do a test with the same font on a separate document and measure the used space for it, then check the width of the form field and adjust accordingly.
Do you have any information on this approach?
Thanks,
Peter
Hi,
We have an issue at the moment where we have a pdf template with form fields we use to customize the pdf with our data and print it. The results are great.
But sometimes the text we want to put in, is too much for the size of the form field and gets cut off. We tried to increate the size of the field and make it multiline, which works for the longer text, but fails for shorter text because we cannot set it to be aligned to the bottom and that makes the shorter text float in mid air, not where it's supposed to. I added some screenshots for clarification.
Is there a good way to deal with this (programmatically)?
Thanks,
Peter
The text was updated successfully, but these errors were encountered: