<script type="text/javascript">
//
<a href="thread/166690/key-has-already-been-added-to-dictionary-exception.aspx#" onclick="return window.ctl00_ctl01_bcr_ctl00___ChangeViewPopupMenu___Menu_ContactPopupMenu.LoadMenu(this,event,['65450','ben.whitney','0','1','','',''],null);" class="CommonImageTextButton" style="background-image: url(/community/Themes/default/images/common/contact.gif);"><span class="CommonButtonInnerContentDown"></span></a>Using Aspose.Slides 2.9.2.3740 and Aspose.Pdf 3.9.0.0<br><br>While saving a PPT file to PDF, I get an exception:<br><br>"Item
has already been added. Key in dictionary:
‘C:\WINDOWS\Fonts\CALIBRI.TTFCalibri’ Key being added:
‘C:\WINDOWS\Fonts\CALIBRI.TTF’."
another similar error has been seen:
“Item has already been added. Key in dictionary:
‘C:\WINDOWS\Fonts\CALIBRI.TTF’ Key being added:
‘C:\WINDOWS\Fonts\CALIBRI.TTF’.”
This occurs in an ASP.NET server environment when converting multiple files including DOC, XLS and PPT. Several other conversions had typically occurred before the PowerPoint was converted, so the DLLs were already loaded into the application pool at that point. The error will only happen the first time. If you try it again, it will work. If you do an IISRESET and run more conversions, the first PPT file seems to trigger the exception.
There is nothing exceptional about the files being converted - they are “HelloWorld” PPT files. The conversion is being done as simple as possible:
Presentation p = new Presentation(inputFile);
p.SaveToPdf(outputFile);
We had the same error occur with XLS files and was seen in build 4.7.0.0 and appears to be resolved in build 4.7.0.2.
Thanks,
Ben