You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2013/10/29 12:42:32 UTC
[jira] [Resolved] (PDFBOX-427) ArrayIndexOutOfBoundsException in
drawString
[ https://issues.apache.org/jira/browse/PDFBOX-427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler resolved PDFBOX-427.
---------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
Assignee: Andreas Lehmkühler
@Tilman
Thanks for the check.
Set to resolved
> ArrayIndexOutOfBoundsException in drawString
> --------------------------------------------
>
> Key: PDFBOX-427
> URL: https://issues.apache.org/jira/browse/PDFBOX-427
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 0.8.0-incubator
> Environment: 1.4.2_07 and 1.5.0_17
> Reporter: Matthew Pangaro
> Assignee: Andreas Lehmkühler
> Fix For: 2.0.0
>
> Attachments: test3.pdf
>
>
> I'm getting the error stack below when printing out a test PDF from my application. Since the error is coming from within the sun.awt stuff, I'm somewhat at a loss for how to debug. This doesn't seem to stop the PDF from rendering/printing, but the fonts on the page do look messed up, so I'm trying to work through stuff and see if there's anything I can fix/improve/patch. Another thing worth noting is that this exception occurs in 1.4.2_07 (don't ask) and 1.5.0_17, but not 1.6.0_x. Also worth noting is that even with the 1.6 not giving the error, the rendering doesn't improve, so maybe this isn't something I don't need to worry about.
> Stack trace below and a sample PDF will be attached after creating the issue.
> SEVERE: Error writing string :
> Feb 18, 2009 1:22:24 PM org.apache.pdfbox.pdmodel.font.PDType1Font drawString
> SEVERE: At coordinates : 609.93475 : 778.9607
> Feb 18, 2009 1:22:24 PM org.apache.pdfbox.pdmodel.font.PDType1Font drawString
> SEVERE: G2 bounds : java.awt.Rectangle[x=0,y=0,width=612,height=792]
> Feb 18, 2009 1:22:24 PM org.apache.pdfbox.pdmodel.font.PDType1Font drawString
> SEVERE: Font : java.awt.Font[family=Times New Roman,name=Times New Roman,style=plain,size=1]
> Feb 18, 2009 1:22:24 PM org.apache.pdfbox.pdmodel.font.PDType1Font drawString
> SEVERE: With exception : 1
> java.lang.ArrayIndexOutOfBoundsException: 1
> at sun.awt.windows.WPrinterJob.setTextColor(WPrinterJob.java:946)
> at sun.awt.windows.WPathGraphics.drawString(WPathGraphics.java:376)
> at org.apache.pdfbox.pdmodel.font.PDType1Font.drawString(PDType1Font.java:232)
> at org.apache.pdfbox.pdfviewer.PageDrawer.processTextPosition(PageDrawer.java:172)
> at org.apache.pdfbox.util.PDFStreamEngine.processEncodedText(PDFStreamEngine.java:442)
> at org.apache.pdfbox.util.operator.ShowText.process(ShowText.java:50)
> at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:491)
> at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:214)
> at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:173)
> at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:89)
> at org.apache.pdfbox.pdmodel.PDPage.print(PDPage.java:764)
> at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1538)
> at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1110)
> at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1011)
> at org.apache.pdfbox.pdmodel.PDDocument.silentPrint(PDDocument.java:886)
> at TestPdfPrintOptions.main(TestPdfPrintOptions.java:34)
--
This message was sent by Atlassian JIRA
(v6.1#6144)