You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "MH (JIRA)" <ji...@apache.org> on 2011/03/23 13:20:05 UTC
[jira] [Commented] (PDFBOX-986) PDFont.getFontWidth():
ClassCastException: Integer cannot be cast to Float
[ https://issues.apache.org/jira/browse/PDFBOX-986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010090#comment-13010090 ]
MH commented on PDFBOX-986:
---------------------------
Example call:
myPDFFont.getStringWidth("1 - 1")
restored pdfbox.jar, fontbox.jar, jempbox.jar from PDFBox 1.4.0 => back working again.
> PDFont.getFontWidth(): ClassCastException: Integer cannot be cast to Float
> --------------------------------------------------------------------------
>
> Key: PDFBOX-986
> URL: https://issues.apache.org/jira/browse/PDFBOX-986
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.5.0
> Environment: JDK 1.6.0_24, WIndows XP 32 Bit
> Reporter: MH
> Priority: Blocker
>
> Just tested upgrading from PDFBox 1.4.0 to 1.5.0. But I get this exception when adding custom text to PDF documents:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Float
> at org.apache.pdfbox.pdmodel.font.PDFont.getFontWidth(PDFont.java:786)
> at org.apache.pdfbox.pdmodel.font.PDSimpleFont.getFontWidth(PDSimpleFont.java:191)
> at org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:283)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira