error with itextSharp see 5.5.10 when extracting Image of a particular page PDF

0

I have tried to implement part of this code in my application extract image from pdf download the itextsharp 5.5.10 but in the code line

new   Matrix(float.Parse(width), float.Parse(height)

exit error correct that error using version 5.2 of itextsharp can you know why this happens?

The error is as follows:

  

can not be converted from 'iTextSharp.text.pdf.parser.Matrix' to   'iTextSharp.text.pdf.parser.GraphicsState'

    
asked by ger 21.02.2017 в 23:09
source

1 answer

0

It is because before the method in ImageRenderInfo.cs was:

    public static ImageRenderInfo CreateForXObject(Matrix ctm, PdfIndirectReference refi, PdfDictionary colorSpaceDictionary)
    {
        return new ImageRenderInfo(ctm, refi, colorSpaceDictionary);        
    }

And now:

    public static ImageRenderInfo CreateForXObject(GraphicsState gs, PdfIndirectReference refi, PdfDictionary colorSpaceDictionary)
    {
        return new ImageRenderInfo(gs, refi, colorSpaceDictionary);
    }

So the first parameter of the method is no longer Matrix , in the new version it is GraphicsState .

If you update iTextSharp you will have to implement another code.

    
answered by 08.03.2017 / 13:58
source