How to generate documents with multiline text fields and keep the font style

OshaK
OshaK ✭✭✭✭✭
edited 02/22/23 in Smartsheet Basics

I'm having trouble generating a document that would place text made by a formula on two lines and retain the font style.


I need to have 2 documents and I'm using two pdfs.

  1. One contains headshots, names and credentials and generates fine from a column in the helper sheet that combines first and last names from the source sheet with this formula:

=INDEX({Name}, MATCH("PGY3 02", {Role}, 0))

cell data looks like this


this document generates fine with the text bolded (it's set in the PDF fields.)

  1. 2. The second document needs to have headshots, names, credentials, and pagers on the second line. In the helper sheet they are combined with this formula:

=INDEX({Name}, MATCH("PGY3 02", {Role}, 0)) + CHAR(10) + INDEX({Pager}, MATCH([PGY3 Resident 2 Name]@row, {Name}, 0))

and the cells look fine and like so:

However, when i generate a document, it doesn't put a pager # on a next line and loses the boldness. On the left, this is how it generates, and on the right - I manually typed in the preview mode and the font style should be bold and stays bold.

I need the pagers be on their own separate lines and the text to be bold. Any ideas would be much appreciated!

Best Answers

  • Genevieve P.
    Genevieve P. Employee
    Answer ✓

    Hi @OshaK

    If you copy/pasted those fields, then even though there's an auto-number appended on the end, Adobe Acrobat considers all fields with the same name to be “linked". That is, any text input into one field will be reflected in all fields.

    Document Builder works to "unlink" fields through your mapping and add unique text to every field, but special properties such as multiline will not be preserved in this instance, which is what you were seeing before. If you can manually unlink those fields (by changing the names) then it should work as expected! 🙂

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • OshaK
    OshaK ✭✭✭✭✭
    Answer ✓

    it worked! Thank you so much, @Genevieve P. !

  • Genevieve P.
    Genevieve P. Employee
    Answer ✓

    Amazing, I'm so glad to hear you were able to resolve this!

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

Answers

  • Hi @OshaK

    The way that the formatting appears in the generated document is based on how you've configured those fields in your fillable PDF.

    I would double check that those fields are formatted as Bold and also multi-line to ensure all of your content is coming through!

    Let me know if this helped,

    Genevieve

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • OshaK
    OshaK ✭✭✭✭✭

    @Genevieve P. thank you, that's what I'm confused about. The text fields are set to be bold and multiline. I made the first one taller to see if there is not enough space, and the text fills in as Normal and no line wrap. When i type into the fields directly, then it's bold.


  • Hi @OshaK

    Thanks for clarifying!

    I've seen this happen before when form fields are linked together - for example because they were copy/pasted. In order to resolve this, you will need to change the name of the fields so that they're each unique, and can be uniquely mapped.

    Once the fields are renamed to unique values, they should be able to be read properly by Document Builder!

    Let me know if that's changed how it pulls your data or not. Thanks,

    Genevieve

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • OshaK
    OshaK ✭✭✭✭✭

    @Genevieve P. thank you. can you please clarify which fields need to have unique names? I'm a bit confused. I have the formula combined first, last names, credentials, and pager numbers. They all come from different columns in the source sheet and then I map them by an individual person to the pdf. So, they are all uniquely mapped because they are all different for each person. so, I'm not sure which fields are not unique as i think they all are. Thank you!

  • Hi @OshaK

    In the screen capture you showed above, it looks like you're using the same fields in the PDF multiple times: "Year", "Image", "Name and Pager"

    Each of your PDF fields called "Name and Pager" would need to have a unique field name to map from Smartsheet to that PDF. Does that make sense?

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • OshaK
    OshaK ✭✭✭✭✭

    Thank you @Genevieve P. I think i understand, but it looks like Acrobat does it on its own - even though I have the same name for all, it adds a unique ID to each. I'm going to try to change the text to see if it helps.

  • Genevieve P.
    Genevieve P. Employee
    Answer ✓

    Hi @OshaK

    If you copy/pasted those fields, then even though there's an auto-number appended on the end, Adobe Acrobat considers all fields with the same name to be “linked". That is, any text input into one field will be reflected in all fields.

    Document Builder works to "unlink" fields through your mapping and add unique text to every field, but special properties such as multiline will not be preserved in this instance, which is what you were seeing before. If you can manually unlink those fields (by changing the names) then it should work as expected! 🙂

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • OshaK
    OshaK ✭✭✭✭✭
    Answer ✓

    it worked! Thank you so much, @Genevieve P. !

  • Genevieve P.
    Genevieve P. Employee
    Answer ✓

    Amazing, I'm so glad to hear you were able to resolve this!

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • Cathy Betzer
    Cathy Betzer ✭✭✭✭✭

    @Genevieve P. thank you for your ideas above. I have a similar question about font. On the PDF I have designated each field to be Noto Serif font and size 9.

    When I upload it into document generator and map unique fields to each data point, it reverts to a different font. We would like our document to have one consistent font throughout. Any ideas?

    Thanks

    Cathy

  • Hi @Cathy Betzer

    Since your field is set correctly, it looks like Noto Serif is a font that is not supported by Document Builder, so it's selecting a default font instead. I would recommend testing a few different fonts to find one that works best for you, other than Noto Serif.

    Cheers,

    Genevieve

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • Cathy Betzer
    Cathy Betzer ✭✭✭✭✭

    Thank you. Unfortunately, that is part of the BRAND for our institution. I appreciate your response.

    Enjoy the day.