Hello, I’m having trouble working through the following error when saving a PDF document.
KeyNotFoundException: The given key was not present in the dictionary.
I’ve narrowed down the issue to the foreign characters in the last page of the PDF creating the error. However, I’ve been unable to find a solution that both prevents the error and saves the new document with the characters as shown in the physical PDF file.
We recently upgraded to Aspose.PDF, Version=23.10.0 from an old 2015 version. The old version does not throw the KeyNotFoundException with the same file, but it does not render a majority of characters on the last page. I’m hopeful to find a way to save without error & show all foreign characters on the last page.
problem_pdf_to_html.pdf (4.9 MB)
Below is a simplified code example to recreate the issue. If anyone has any suggestions here I’d greatly appreciate it.
var pdf = new Aspose.Pdf.Document(HttpContext.Current.Server.MapPath(“\Documents\problem_pdf_to_html.pdf”));
pdf.Save(“D:\Documents\problemFileToWord.docx”, SaveFormat.DocX);