We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Words 14.9 breaks saving to PDF on systems without a printer

When attempting to save a Word document to PDF, you are now causing this exception to throw on our 2012 R2 servers where the code is running in a Windows service without an interactive login:

at .()
at ​ .( , Single )
at ​ . ()
at . ()
at . ()
at .()
at .( , Int32 )
at .( )
at .( , Int32 )
at .( , Int32 , Boolean )
at .()
at .( , Int32 , Boolean , Boolean )
at .( )
at .(Boolean )
at .( )
at .(Boolean )
at . ()
at .(Document , )
at Aspose.Words.Document.(Boolean )
at .( , )
at . ( )
at Aspose.Words.Document.(Stream , String , SaveOptions )
at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)

[Base Exception]
System.Drawing.Printing.InvalidPrinterException: No printers are installed.
at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal(String printer)
at System.Drawing.Printing.PrinterSettings.CreateDeviceContext(PageSettings pageSettings)
at System.Drawing.Printing.PrinterSettings.CreateMeasurementGraphics(PageSettings pageSettings)
at ..cctor()

Hi Barry,

Thanks for your inquiry. Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.

Example attached. Running this code on a system without a printer installed will throw the exception in 14.9.


var doc = new Aspose.Words.Document(“repro.doc”);
doc.Save(new MemoryStream(), Aspose.Words.SaveFormat.Pdf);


Hi Barry,

Thanks for sharing the detail. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10957. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-10957) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.