linkedinfacebooktwittermenuarrow-up

GemBox Support Forum

System.IndexOutOfRangeException thrown when saving document to PDF

I am receiving a System.IndexOutOfRangeException when converting a word document to pdf. Could this be caused by files containing a single quote in the filename? Currently, that is the only case that allows me to reproduce this issue. See below.

The DocumentModel is loaded fine but the error is thrown on the save call.

filePath = @"C:\dev\PLM Document Search\DocSearchApp\wwwroot\temp\B1BEDE9170154495B3DC53CB66138D6B\10-00002 PLM User's Manual.docx";
DocumentModel document = DocumentModel.Load(filePath);
document.Save(newPath);

Hi Jamey,

I don’t believe that the problem occurs because of the file name, I think that the problem is with the document’s content itself.

Can you please send us your DOCX file so that we can reproduce this issue and investigate it?

Regards,
Mario

Thanks Mario. I sent an email with the file in question. Ticket 28610.

Hi Jamey,

Please try again with this bugfix:
https://www.gemboxsoftware.com/document/nightlybuilds/GBD35v1163.zip

Or this NuGet package:
Install-Package GemBox.Document -Version 35.0.1163-hotfix

Does this solve your issue?

Regards,
Mario