Menu

Exception extracting text from PDF

2015-04-27
2015-04-28
  • Willyan Klumb

    Willyan Klumb - 2015-04-27

    Hi,

    I'm getting this error when I try to extract the text from some PDFs:

    Unable to cast object of type 'org.pdfclown.objects.PdfReal' to type org.pdfclown.objects.PdfInteger'.

    em org.pdfclown.documents.contents.fonts.CompositeFont.OnLoad()
    em org.pdfclown.documents.contents.fonts.Font.Load()
    em org.pdfclown.documents.contents.fonts.Font..ctor(PdfDirectObject baseObject)
    em org.pdfclown.documents.contents.fonts.CompositeFont..ctor(PdfDirectObject baseObject)
    em org.pdfclown.documents.contents.fonts.Type2Font..ctor(PdfDirectObject baseObject)
    em org.pdfclown.documents.contents.fonts.Font.Wrap(PdfDirectObject baseObject)
    em org.pdfclown.documents.contents.FontResources.Wrap(PdfDirectObject baseObject)
    em org.pdfclown.documents.contents.ResourceItems`1.get_Item(PdfName key)
    em org.pdfclown.documents.contents.objects.SetFont.GetResource(IContentContext context)
    em org.pdfclown.documents.contents.objects.SetFont.GetFont(IContentContext context)
    em org.pdfclown.documents.contents.objects.SetFont.Scan(GraphicsState state)
    em org.pdfclown.documents.contents.ContentScanner.MoveNext()
    em org.pdfclown.documents.contents.ContentScanner.TextWrapper.Extract(ContentScanner level)
    em org.pdfclown.documents.contents.ContentScanner.TextWrapper..ctor(ContentScanner scanner)
    em org.pdfclown.documents.contents.ContentScanner.GraphicsObjectWrapper.Get(ContentScanner scanner)
    em org.pdfclown.documents.contents.ContentScanner.get_CurrentWrapper()

    I'm using pdfclown version 0.1.2.0

     
  • Stefano Chizzolini

    Please try those files with the updated code snapshot; if the problem persists, open a Bug ticket attaching one of your files (if possible -- consider that fixing a bug without a sample to test may be quite difficult).

     
  • Willyan Klumb

    Willyan Klumb - 2015-04-28

    Thanks for your reply.
    I tried your update, but the error still happens.

    I opened a Bug ticket: https://sourceforge.net/p/clown/bugs/67/

     
  • Stefano Chizzolini

    Bug fixed, thank you.
    Stefano

     
  • Willyan Klumb

    Willyan Klumb - 2015-04-28

    The new dll was added to my project. Working like a charm :)
    Thank you!

     

Log in to post a comment.

MongoDB Logo MongoDB