Error opening this pdf

4 posts, 0 answers
  1. JC
    JC avatar
    37 posts
    Member since:
    Sep 2010

    Posted 18 Jan 2019 Link to this post


    I can't open this pdf with PdfDocumentSource

    >> https://    rkqtk

    Here the full error : 

    System.IndexOutOfRangeException: Index was outside the bounds of the array.<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.TryReadIndirectObject(Int64 offset, Boolean isEncrypted, IndirectObjectOld& indirectObject)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.ReadCrossReferenceStream(Int64 offset, CrossReferenceStreamOld& stream, Byte[]& data)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.InitTrailerAndCrossReferenceStream(Int64 offset)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.ReadCrossReferenceCollection(Int64 offset)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.InitializeCrossReferences()<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.PdfContentManager..ctor(PdfFormatProvider provider, Stream stream)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.Import()<br>   at Telerik.Windows.Documents.Fixed.PdfDocumentSource.CreateDocumentFromStreamOverride(Stream stream, FormatProviderSettings settings)<br>   at Telerik.Windows.Documents.Fixed.FixedDocumentStreamSource.CreateDocumentFromStream(Stream stream, FormatProviderSettings settings)


    Thanks for your help :)

  2. JC
    JC avatar
    37 posts
    Member since:
    Sep 2010

    Posted 28 Jan 2019 Link to this post

    No idea for me ?


  3. Tanya
    Tanya avatar
    894 posts

    Posted 31 Jan 2019 Link to this post

    Hi JC,

    It seems like the file has some invalid byte offsets in its cross-reference table which are preventing RadPdfViewer from reading its content. According to the PDF file format specification, the cross-reference table is the point where the reading of the document content starts. When the offset defining the table is wrong, the format provider cannot find the starting point, thus it fails to import the document. What I can suggest to repair the document is to re-save it using Adobe Reader as it will automatically find the table when opening the file and replace the wrong value when saving it.

    Hope this helps.

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. JC
    JC avatar
    37 posts
    Member since:
    Sep 2010

    Posted 11 Feb 2019 Link to this post

    Thanks for your reply

    But, as you may have noticed, the file opens well with Acobat Reader and others pdf tools

    So, it seems that telerik lib will have to open it too no ?

    For me it's a bug, but I understand that you don't want to fix it ...


Back to Top