[ 
https://issues.apache.org/jira/browse/PDFBOX-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-2935:
------------------------------------
    Description: 
PDFontSetting.getFont() :
{code}
public PDFont getFont() throws IOException
    {
        PDFont retval = null;
        COSBase font = fontSetting.get( 0 );
        if( font instanceof COSDictionary )
        {
            retval = PDFontFactory.createFont( (COSDictionary)font );
        }
        return retval;
    }
{code}
If font is referenced as indirect object this method returns null, while font 
is valid and present in document. 
Example :
 {code}
10 0 obj
<<
/Font [13 0 R 60000]
/Type /ExtGState
>>
endobj

13 0 obj
<<
/BaseFont /ASJKFO+Arial-BoldMT
/Encoding /WinAnsiEncoding
/FirstChar 65
/FontDescriptor 16 0 R
/LastChar 65
/Subtype /TrueType
/Type /Font
/Widths [722]
>>
endobj
{code}

  was:
PDFontSetting.getFont() :
public PDFont getFont() throws IOException
    {
        PDFont retval = null;
        COSBase font = fontSetting.get( 0 );
        if( font instanceof COSDictionary )
        {
            retval = PDFontFactory.createFont( (COSDictionary)font );
        }
        return retval;
    }

If font is referenced as indirect object this method returns null, while font 
is valid and present in document. 
Example :
 
10 0 obj
<<
/Font [13 0 R 60000]
/Type /ExtGState
>>
endobj

13 0 obj
<<
/BaseFont /ASJKFO+Arial-BoldMT
/Encoding /WinAnsiEncoding
/FirstChar 65
/FontDescriptor 16 0 R
/LastChar 65
/Subtype /TrueType
/Type /Font
/Widths [722]
>>
endobj


> Problem while extracting font from PDFontSetting (used in 
> PDExtendedGraphicsState)
> ----------------------------------------------------------------------------------
>
>                 Key: PDFBOX-2935
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2935
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.8.10, 1.8.11, 2.0.0
>            Reporter: Timur Kamalov
>             Fix For: 1.8.11, 2.0.0
>
>
> PDFontSetting.getFont() :
> {code}
> public PDFont getFont() throws IOException
>     {
>         PDFont retval = null;
>         COSBase font = fontSetting.get( 0 );
>         if( font instanceof COSDictionary )
>         {
>             retval = PDFontFactory.createFont( (COSDictionary)font );
>         }
>         return retval;
>     }
> {code}
> If font is referenced as indirect object this method returns null, while font 
> is valid and present in document. 
> Example :
>  {code}
> 10 0 obj
> <<
> /Font [13 0 R 60000]
> /Type /ExtGState
> >>
> endobj
> 13 0 obj
> <<
> /BaseFont /ASJKFO+Arial-BoldMT
> /Encoding /WinAnsiEncoding
> /FirstChar 65
> /FontDescriptor 16 0 R
> /LastChar 65
> /Subtype /TrueType
> /Type /Font
> /Widths [722]
> >>
> endobj
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to