Jump to content
We've recently updated our Privacy Statement, available here ×

Intermittent Premature Wrapping of All Text and Static Text


jschweickart

Recommended Posts

I am creating a Pdf using JasperReport 4.0.2 and am experiencing intermittent Pdf that prematurely wrap every text and static-text field.  We produce about 150-200K Pdfs per month and store them in an Oracle database as BLOBs.  We have not been able to reproduce this in a test environment, but we know we are generating  intermittent bad Pdfs because we get customer complaints and can pull the BLOB and see it is broken.  

I took a look at a single static-text field that is a label, "NPI:", with lots of horizontal room in the jrxml file:

            <staticText>
                <reportElement key="staticText-16" x="111" y="35" width="92" height="11"/>
                 <textElement>
                    <font fontName="DejaVu Sans" size="7" isBold="true" pdfFontName="Helvetica-Bold"/>
                </textElement>
                <text><![CDATA[NPI:]]></text>
            </staticText>

Like every other text and static-text, it still wraps after "NP" on the Pdf.  Here are images with patient and provider info removed, of the broken and working Pdfs.  I have circled the NPI: label in each.

bad_pdf.jpg.e234978e0b9906a1dde4571e72937775.jpg

good_pdf.jpg.66db3d1c6a33fd74aff88e57a30b7844.jpg

I used PdfEdit to convert the Pdf to XML and found that the broken Pdf had a shorter area to place the NPI: label.  Here's the broken Pdf XML for the NPI: label:

        <word bbox="xleft: 131 yleft: 63.33 xright: 141.976 yright: 56.337" >
            <font basename="RYHHBO+DejaVuSans-Bold" origname="RYHHBO+DejaVuSans-Bold" embeddedfontname="RYHHBO+DejaVuSans-Bold" tag="F2" serif="false" symbolic="false" italic="false" bold="true" ascent="0.759" descent="-0.24" writemode="horizontal" fonttype="TrueType (8bit)" >
            <frag bbox="xleft: 131 yleft: 63.33 xright: 141.976 yright: 56.337" >NP</frag>
            </font>
        </word>
        <word bbox="xleft: 131 yleft: 69.98 xright: 136.397 yright: 62.987" >
            <font basename="RYHHBO+DejaVuSans-Bold" origname="RYHHBO+DejaVuSans-Bold" embeddedfontname="RYHHBO+DejaVuSans-Bold" tag="F2" serif="false" symbolic="false" italic="false" bold="true" ascent="0.759" descent="-0.24" writemode="horizontal" fonttype="TrueType (8bit)" >
            <frag bbox="xleft: 131 yleft: 69.98 xright: 136.397 yright: 62.987" >I<specialchar>colon</specialchar></frag>
            </font>
        </word>

 

Here is the one that is correct, on a single line:

        <word bbox="xleft: 131 yleft: 63.18 xright: 147.373 yright: 56.187" >
            <font basename="KOELSO+DejaVuSans-Bold" origname="KOELSO+DejaVuSans-Bold" embeddedfontname="KOELSO+DejaVuSans-Bold" tag="F2" serif="false" symbolic="false" italic="false" bold="true" ascent="0.759" descent="-0.24" writemode="horizontal" fonttype="TrueType (8bit)" >
            <frag bbox="xleft: 131 yleft: 63.18 xright: 147.373 yright: 56.187" >NPI<specialchar>colon</specialchar></frag>
            </font>
        </word>

Any ideas on what could be causing this?  Also, any ideas on how we can identify how many of our Pdf BLOBs have this issue without pulling them from the database and coverting them to XML?

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...