title: Jasper Report PDF Export text missing in text field at page break
body: <p>I have created a JRXML file using iReports. It has a header and a footer. In the details band, i have a text field which has large content of normally about 2 pages. I have enabled the Stretch with overflow option.</p>
  
  <p>Now when i generate the PDF report the last 1-2 lines at the bottom of the page  go missing/cut/hidden. I thought and removed the header and footer. But that also didnt solve the problem. I have kept bottom page margin at 20.</p>
  
  <p>This means that at the page break area this problem is occuring.</p>
  
  <p>The following is the JRXML Content:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="test" pageWidth="612" pageHeight="792" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="5" bottomMargin="5" uuid="53aa864d-199b-459a-ba86-50a79a5a65a4"&gt;
      &lt;property name="net.sf.jasperreports.awt.ignore.missing.font" value="true"/&gt;
      &lt;subDataset name="dataset1" uuid="a4f2a563-4bd0-4885-b1a0-ac4fa8bd3f5b"&gt;
          &lt;field name="ccRow" class="java.lang.String"&gt;
              &lt;fieldDescription&gt;&lt;![CDATA[_THIS]]&gt;&lt;/fieldDescription&gt;
          &lt;/field&gt;
      &lt;/subDataset&gt;
      &lt;field name="providerName" class="java.lang.String"/&gt;
      &lt;field name="img" class="java.awt.Image"/&gt;
      &lt;field name="patientName" class="java.lang.String"/&gt;
      &lt;field name="patientMR" class="java.lang.String"/&gt;
      &lt;field name="gender" class="java.lang.String"/&gt;
      &lt;field name="birthDate" class="java.lang.String"/&gt;
      &lt;field name="dateAndTime" class="java.lang.String"/&gt;
      &lt;field name="capturedImage" class="java.awt.Image"/&gt;
      &lt;field name="formattedNoteData" class="java.lang.String"/&gt;
      &lt;field name="refDoc" class="java.lang.String"/&gt;
      &lt;field name="address" class="java.lang.String"/&gt;
      &lt;field name="ccList" class="java.util.Collection"/&gt;
      &lt;field name="credentials" class="java.lang.String"/&gt;
      &lt;field name="proCred" class="java.lang.String"/&gt;
      &lt;field name="firstLine" class="java.lang.String"/&gt;
      &lt;field name="secondLine" class="java.lang.String"/&gt;
      &lt;field name="country" class="java.lang.String"/&gt;
      &lt;field name="phNumber" class="java.lang.String"/&gt;
      &lt;field name="faxNumber" class="java.lang.String"/&gt;
      &lt;field name="email" class="java.lang.String"/&gt;
      &lt;field name="imagePrac" class="java.awt.Image"/&gt;
      &lt;pageHeader&gt;
          &lt;band height="27" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="-6" y="0" width="325" height="13" uuid="6b4c5a9f-4538-40ce-8c73-9ebd6f5c59ba"/&gt;
                  &lt;textElement&gt;
                      &lt;font fontName="Times New Roman" size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Oral &amp; Maxillofacial Surgery Clinical Electronic Record]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/pageHeader&gt;
      &lt;detail&gt;
          &lt;band height="515"&gt;
              &lt;image scaleImage="RetainShape" isUsingCache="false"&gt;
                  &lt;reportElement x="196" y="0" width="230" height="70" uuid="a088b7f1-c74c-404c-8c19-9f9346d25165"/&gt;
                  &lt;imageExpression&gt;&lt;![CDATA[$F{imagePrac}]]&gt;&lt;/imageExpression&gt;
              &lt;/image&gt;
              &lt;line&gt;
                  &lt;reportElement x="0" y="72" width="572" height="1" uuid="b00781d9-b84e-4f61-a2a4-6b229139cdbc"/&gt;
                  &lt;graphicElement&gt;
                      &lt;pen lineStyle="Double"/&gt;
                  &lt;/graphicElement&gt;
              &lt;/line&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="177" y="79" width="208" height="13" uuid="044e719b-f9a1-45f0-9a06-ce9dd1f760b2"/&gt;
                  &lt;textElement textAlignment="Center"&gt;
                      &lt;font size="6" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{providerName}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="201" y="92" width="159" height="13" isRemoveLineWhenBlank="true" uuid="3771672a-13a3-455d-a4da-9510717abd3e"/&gt;
                  &lt;textElement textAlignment="Center"&gt;
                      &lt;font size="6" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{firstLine}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="201" y="105" width="159" height="13" isRemoveLineWhenBlank="true" uuid="46f6496b-788f-4e95-8347-eb8290a48924"/&gt;
                  &lt;textElement textAlignment="Center"&gt;
                      &lt;font size="6" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{secondLine}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="201" y="118" width="159" height="13" isRemoveLineWhenBlank="true" uuid="16836b5e-9012-491c-be1e-23a88f3a9bf2"/&gt;
                  &lt;textElement textAlignment="Center"&gt;
                      &lt;font size="6" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{country}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="215" y="130" width="133" height="13" uuid="931aabed-e782-4629-b8ee-5d1a4d8f9f50"/&gt;
                  &lt;textElement textAlignment="Center" markup="html"&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{phNumber} == null ? "" : "&lt;b&gt;Phone: &lt;/b&gt;" +$F{phNumber}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="216" y="143" width="130" height="13" isRemoveLineWhenBlank="true" uuid="5a7d4295-a38d-4975-a97d-7afc2d77e2db"/&gt;
                  &lt;textElement textAlignment="Center" markup="html"&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{faxNumber} ==null ? "" :"&lt;b&gt;Fax: &lt;/b&gt;" + $F{faxNumber}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="172" y="156" width="223" height="13" uuid="62fd8172-e885-4b63-9653-63713c2c2662"/&gt;
                  &lt;textElement textAlignment="Center" markup="html"&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{email}!=null ? "&lt;b&gt;Email: &lt;/b&gt;" + $F{email} : " "]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;line&gt;
                  &lt;reportElement x="0" y="171" width="572" height="1" uuid="9527ae6f-7293-43e3-9e77-a2dc56a727d3"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[$F{refDoc} != null]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
              &lt;/line&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="0" y="171" width="125" height="19" isRemoveLineWhenBlank="true" uuid="8c6d4745-4654-4a6b-bcc4-b2b76571fa53"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[$F{refDoc} != null]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;textElement&gt;
                      &lt;font size="6" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Referring Doctor :]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="0" y="190" width="170" height="13" isRemoveLineWhenBlank="true" uuid="154add6d-5fa2-4aea-b34b-5b9b1b11146b"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{refDoc}==null?"":($F{refDoc}+", "+$F{credentials})]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="0" y="203" width="572" height="13" isRemoveLineWhenBlank="true" uuid="097d0924-ab63-46f6-b4e5-0d048fb78ffe"/&gt;
                  &lt;textElement markup="html"&gt;
                      &lt;font size="6" isBold="false"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{address}==null?"":$F{address}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;line&gt;
                  &lt;reportElement x="0" y="216" width="572" height="1" isRemoveLineWhenBlank="true" uuid="e24c47c9-5c1c-463f-855b-3755cf9e372b"/&gt;
              &lt;/line&gt;
              &lt;image&gt;
                  &lt;reportElement x="0" y="218" width="89" height="87" uuid="e0bbb98b-d689-4ae3-8ee9-eddefddcf705"/&gt;
                  &lt;imageExpression&gt;&lt;![CDATA[$F{img}]]&gt;&lt;/imageExpression&gt;
              &lt;/image&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="101" y="222" width="79" height="13" uuid="898012d3-c308-47a8-86c3-aa01d6e94521"/&gt;
                  &lt;textElement textAlignment="Left"&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Patient Name :]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="179" y="222" width="196" height="13" uuid="5b145ec7-1028-4663-93e2-d4701e60d00c"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{patientName}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="101" y="234" width="79" height="13" uuid="1dd3283d-51aa-45a6-b30c-09bcbabbeec7"/&gt;
                  &lt;textElement textAlignment="Left"&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Patient MR# :]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement x="179" y="234" width="196" height="13" uuid="17626ebc-0558-478b-bd06-c9b70d1ba261"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{patientMR}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="101" y="246" width="79" height="13" uuid="dc43a118-a847-421a-8ced-d236c6c9b61a"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Patient Gender :]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="179" y="246" width="100" height="13" uuid="f1d01437-6277-479e-b446-00b151507d45"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{gender}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="101" y="258" width="90" height="13" uuid="09ca7fd8-efc4-4903-b755-5eb67eb0e434"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Patient Birth Date :]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="190" y="258" width="175" height="13" uuid="82fa7dc4-e6bb-4f61-bdcb-d04e2438a020"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{birthDate}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="101" y="270" width="137" height="13" uuid="54b83ed0-b61b-44ed-9067-dc15b928ff44"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Original Note Date and Time :]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="237" y="270" width="180" height="13" uuid="41bb843a-0a0e-4f1b-89af-4775c0025e79"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{dateAndTime}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;line&gt;
                  &lt;reportElement x="0" y="314" width="572" height="1" uuid="a99e28ef-eaa4-454b-857b-b24f83462902"/&gt;
              &lt;/line&gt;
              &lt;textField isStretchWithOverflow="true" isBlankWhenNull="true"&gt;
                  &lt;reportElement mode="Opaque" x="18" y="322" width="531" height="106" uuid="6cb7b164-7f9f-465b-a921-2064a18dec0a"/&gt;
                  &lt;textElement markup="html"&gt;
                      &lt;font fontName="Calibri" pdfEncoding="UTF-8" size="12" isBold="false" isPdfEmbedded="true" pdfFontName="//D:/Calibri.ttf" /&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{capturedImage}==null?$F{formattedNoteData}:""]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;line&gt;
                  &lt;reportElement positionType="Float" x="0" y="432" width="572" height="1" uuid="0d73a477-c321-4b50-a644-4099ec01bd28"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[$F{ccList}!=null]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
              &lt;/line&gt;
              &lt;componentElement&gt;
                  &lt;reportElement positionType="Float" x="37" y="436" width="400" height="13" isRemoveLineWhenBlank="true" uuid="7b495409-c1fd-461e-9444-14af83ce993d"/&gt;
                  &lt;jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical"&gt;
                      &lt;datasetRun subDataset="dataset1" uuid="ca9177e5-e8f4-4d5c-836e-f0f15aa347b7"&gt;
                          &lt;dataSourceExpression&gt;&lt;![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{ccList})]]&gt;&lt;/dataSourceExpression&gt;
                      &lt;/datasetRun&gt;
                      &lt;jr:listContents height="13" width="400"&gt;
                          &lt;textField isBlankWhenNull="true"&gt;
                              &lt;reportElement positionType="Float" x="0" y="0" width="375" height="13" isRemoveLineWhenBlank="true" uuid="452d2a0c-6022-43a1-bd94-1ffb38347307"/&gt;
                              &lt;textElement&gt;
                                  &lt;font size="6"/&gt;
                              &lt;/textElement&gt;
                              &lt;textFieldExpression&gt;&lt;![CDATA[$F{ccRow}==null?"":$F{ccRow}]]&gt;&lt;/textFieldExpression&gt;
                          &lt;/textField&gt;
                      &lt;/jr:listContents&gt;
                  &lt;/jr:list&gt;
              &lt;/componentElement&gt;
              &lt;staticText&gt;
                  &lt;reportElement positionType="Float" x="9" y="436" width="29" height="13" isRemoveLineWhenBlank="true" uuid="eb527dc0-1fb0-4db9-b2b3-be239485d2bc"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[$F{ccList}!=null]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;textElement&gt;
                      &lt;font size="6" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[cc :]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
      &lt;pageFooter&gt;
          &lt;band height="24" splitType="Stretch"&gt;
              &lt;textField&gt;
                  &lt;reportElement x="-6" y="6" width="50" height="13" uuid="6932e2e3-c51f-4871-960a-ccbe735d56c1"/&gt;
                  &lt;textElement textAlignment="Right"&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField evaluationTime="Report"&gt;
                  &lt;reportElement x="44" y="6" width="40" height="13" uuid="9f7a7f9f-5ec5-4f30-8ace-73ec8cc4b4d6"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[" " + $V{PAGE_NUMBER}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField pattern="MM/dd/yyyy hh:mm:ss a"&gt;
                  &lt;reportElement x="462" y="5" width="110" height="14" uuid="e0cb9378-bb2c-47b0-b0dd-013ad846a05e"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="6"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[new java.util.Date()]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/pageFooter&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>Here is the screenshot also of the PDF Generated. The text after last line of 1st page is missing and you can see the remaining text on the 2nd page which comes after the missing text.</p>
  
  <p>Text between 2 lines is missing:</p>
  
  <p><img src="https://i.stack.imgur.com/x6Kma.png" alt="Text between 2 lines is missing"></p>
  
  <p>What do i do to fix this? </p>