You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2013/10/08 19:30:45 UTC

[jira] [Comment Edited] (PDFBOX-427) ArrayIndexOutOfBoundsException in drawString

    [ https://issues.apache.org/jira/browse/PDFBOX-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13783866#comment-13783866 ] 

Tilman Hausherr edited comment on PDFBOX-427 at 10/8/13 5:30 PM:
-----------------------------------------------------------------

I believe this one can be closed, due to the changes that try to avoid awt. I could print the file with the 2.0 trunk without getting a stack trace. (The bullets near "diff" are missing, see PDFBOX-1742)


was (Author: tilman):
I believe this one can be closed, due to the changes that try to avoid awt. I could print the file with the 2.0 trunk without getting a stack trace. (The bullets near "diff" are missing, but this is a different issue, probably PDFBOX-1701 or PDFBOX-1689)

> 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
>         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)