[reportlab-users] Problem with long text in a textField

Kip Nalley kip at sophicalliance.com
Tue May 28 15:39:31 EDT 2024


Hello,
I'm using reportlab with a .prep file to generate a PDF.  The issue is that when I have long text in a textField like below, the text is truncated, and the \n newline characters are not rendered as new lines.  The size of the textField can accommodate the text, it just won't render anything beyond a certain number of characters as a single string. Neither '<br>' nor '<br/>' work to break up the text (I have tried both).  Multiline does nothing as far as I can tell.

IF I replace \n with 
 the text goes into the box but is truncated after 1000 characters.  But if I pass the value as a variable, the 
 is rendered as text.

So there are two issues simultaneously: How can I get the text to format properly so the whole text blob is included and rendered with line breaks in the textField?


<illustration height="20cm" width="20cm">
                <textField x="0cm" y="3cm"
                name="LLM_summary"
                width="20cm" height="15cm"
                fontSize="10"
                multiline="true"
                value="Tacrolimus:\n- Evidence from PharmGKB shows genotype GG is associated with increased risk of remaining on steroids at 1 year after transplantation when treated with prednisone and tacrolimus in people with heart transplantation as compared to genotypes AA + AG.\n\nPrednisone:\n- Evidence from PharmGKB shows genotype GG is associated with increased risk of remaining on steroids at 1 year after transplantation when treated with prednisone and tacrolimus in people with heart transplantation as compared to genotypes AA + AG.\n\nMethotrexate:\n- Evidence from PharmGKB shows allele G is not associated with risk of Drug Toxicity due to methotrexate in children with Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to allele A.\n- Evidence from PharmGKB shows allele G is not associated with risk of Drug Toxicity due to methotrexate in children with Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to allele A.\n- Evidence from PharmGKB shows genotypes AA + AG are associated with decreased response to methotrexate in children with Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to genotype GG.\n- Evidence from PharmGKB shows allele A is not associated with response to methotrexate in children with Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to allele G.\n- Evidence from PharmGKB shows allele A is not associated with response to methotrexate in children with Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to allele G.\n- Evidence from PharmGKB shows allele G is not associated with exposure to methotrexate in children with Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to allele A.\n- Evidence from PharmGKB shows genotype AG is associated with increased concentrations of methotrexate in children with Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to genotype GG.\n- Evidence from PharmGKB shows genotype AA is not associated with concentrations of methotrexate in children with Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to genotypes AG + GG.\n- Evidence from PharmGKB shows genotypes AA + AG are not associated with concentrations of methotrexate in children with Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to genotype GG.\n- Evidence from PharmGKB shows genotype AA is associated with increased concentrations of methotrexate in people with Burkitt Lymphoma, Lymphoma, T-Cell and Precursor Cell Lymphoblastic Leukemia-Lymphoma as compared to genotype GG."></textField>

</illustration>



Kip Nalley, Ph.D.
Director of Software Innovations
Sophic Alliance, Inc.
[cid:image001.jpg at 01DAB111.82A12450]
https://sophicalliance.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20240528/c1de4cbb/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 9016 bytes
Desc: image001.jpg
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20240528/c1de4cbb/attachment-0001.jpg>


More information about the reportlab-users mailing list