java.lang.ArrayIndexOutOfBoundsException: 2048

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v6)  /  java.lang.ArrayIndexOutOfBoundsException: 2048

DynamicPDF CoreSuite for .NET (v6) Forum

During a print attempt I am getting the following stacktrace and am unable to determine the cause of it.


java.lang.ArrayIndexOutOfBoundsException: 2048
        at com.cete.dynamicpdf.io.i.b(Unknown Source)
        at com.cete.dynamicpdf.io.OperatorWriter.write_TJ(Unknown Source)
        at com.cete.dynamicpdf.text.TextLineList.a(Unknown Source)
        at com.cete.dynamicpdf.text.TextLineList.draw(Unknown Source)
        at com.cete.dynamicpdf.pageelements.Cell2.a(Unknown Source)
        at com.cete.dynamicpdf.pageelements.Row2.a(Unknown Source)
        at com.cete.dynamicpdf.pageelements.Row2List.a(Unknown Source)
        at com.cete.dynamicpdf.pageelements.Table2.drawRotated(Unknown Source)
        at com.cete.dynamicpdf.pageelements.RotatingPageElement.draw(Unknown Source)
        at com.cete.dynamicpdf.pageelements.Group.draw(Unknown Source)
        at com.cete.dynamicpdf.Page.drawAppend(Unknown Source)
        at com.cete.dynamicpdf.Page.drawEntries(Unknown Source)
        at com.cete.dynamicpdf.Page.draw(Unknown Source)
        at com.cete.dynamicpdf.io.n.h(Unknown Source)
        at com.cete.dynamicpdf.io.n.draw(Unknown Source)
        at com.cete.dynamicpdf.Document.draw(Unknown Source)
        at com.cete.dynamicpdf.Document.draw(Unknown Source)
        at AbstractPdfWriter.printToFile(AbstractPdfWriter.java:221)
Posted by a ceTe Software moderator
Hello,

Can you please try using the latest DynamicPDF for Java product jar file in your application and see if it works for you? You can download the latest version 6 DynamicPDF jar file by logging into our CustomerArea using your version 6 DynamicPDF product serial number. Remove reference for the older jar file and reference the latest.

If you continue getting the error even after using the latest DynamicPDF jar file then please send over the following details to our support team so that they can look into it further.

1.Sample code which uses static data using which we can recreate the error.
2.Exact version and build number of the DynamicPDF jar file.

Thanks,
ceTe Software Support Team.
I discovered the issue.

One of our users had entered several lines of text similar to the following:
"MEDICATION                   METHOD           DOSE             FREQ"

(the longest line was ~165 characters long)

When our PDF creator tried to put that into a table, my guess is that this line would not get wrapped auto-magically by the Cell class, and so it overflowed off the end of the page/table? My only guess as to why that occurs is that we used TextAlign.JUSTIFY on the cell contents?

As soon as I remove the use of JUSTIFY then it works just fine and wraps like it is supposed to. However, there are paragraphs of text before this "formatted" line that wrap just fine, maybe the wrapping screws up when there are a bunch of spaces in the line and you use JUSTIFY?

Posted by a ceTe Software moderator
Hello,

We have not seen this kind of issue before. Please email the following information to our support team at support@cete.com so we can reproduce the issue on our end and answer your questions appropriately.

1. Sample code & static data using which we can recreate the error.
2. Version & build numbers of the DynamicPDF jar file.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 3:26 AM.