Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#16 Index was outside the bounds of the array

v1.0 (example)
closed
nobody
None
5
2013-05-13
2013-03-07
SLavaLL
No

Hello.

In some cases I have an exception "Index was outside the bounds of the array"
Callstack:
at PdfSharp.Fonts.OpenType.GlyphDataTable.GetOffset(Int32 glyph)
at PdfSharp.Fonts.OpenType.GlyphDataTable.GetGlyphSize(Int32 glyph)
at PdfSharp.Fonts.OpenType.FontData.CreateFontSubSet(Dictionary`2 glyphs, Boolean cidFont)
at PdfSharp.Pdf.Advanced.PdfCIDFont.PrepareForSave()
at PdfSharp.Pdf.Advanced.PdfType0Font.PrepareForSave()
at PdfSharp.Pdf.Advanced.PdfFontTable.PrepareForSave()
at PdfSharp.Pdf.PdfDocument.PrepareForSave()
at PdfSharp.Pdf.PdfDocument.DoSave(PdfWriter writer)
at PdfSharp.Pdf.PdfDocument.Save(Stream stream, Boolean closeStream)

Discussion

  • What is the use case here? Is there an unusual font being used, or something else noteworthy? I'm using PDFsharp (0.9, .NET 1.1) and wondering whether I can run into this problem, or have more information to investigate it myself.

     
  • I see in the stack backtrace a call to PdfSharp.Pdf.Advanced.PdfCIDFont.PrepareForSave(), which appears to be handling a CID font. Is this then for Hangeul/ Chinese/ Japanese text?

     
  • PDFsharp Team
    PDFsharp Team
    2013-05-13

    AFAIK CID fonts are also needed for Unicode. PDFsharp support Unicode, but not CJK.

     
  • PDFsharp Team
    PDFsharp Team
    2013-05-13

    • status: open --> closed
    • Group: --> v1.0 (example)
     
  • PDFsharp Team
    PDFsharp Team
    2013-05-13

    Not reproducible.