Message was shown when save a pdf document

I am using the Aspose.Pdf.Document library with redistributable license, 
however, it is found that the message was shown as following when I create and save the pdf document recently.
There is no error before 01-April-2017
Exception Message: At most 4 elements (for any collection) can be viewed in evaluation mode.

System.IndexOutOfRangeException: At most 4 elements (for any collection) can be viewed in evaluation mode.
at Aspose.Pdf.Document.(Int32 )
at Aspose.Pdf.OperatorCollection.get(Int32 )
at Aspose.Pdf.Document.(Resources , , OperatorCollection )
at Aspose.Pdf.Document.(PageCollection )
at Aspose.Pdf.Document.(PageCollection )
at Aspose.Pdf.Document.Save(Stream output)
at Aspose.Pdf.Document.Save(String outputFileName)


And idea?

Hi Edie,


Thanks for contacting support.

Please make sure that your license is not expired and in a case it is still valid, please make sure to set license on your application start before using any Aspose.Pdf for .NET Classes. You may consider following ways to check proper initialization of you license.

  • If you are developing a web application (ASP.NET), it is better to call License.SetLicense() method inside Application_Start protected method which can be found in Global.asax.cs file. Also please try not to set license in Page_Load event, because doing so will cause license loading every time a webpage is loaded.
  • If you are working with Desktop/Console Applications, then please call License.SetLicense() method in application start event.
  • In case of class library, you can set your license in static constructor of a class, so that license can be loaded when class instance is created before using Aspose.Pdf for .NET Classes.
  • If you are developing WCF Service, it is depended upon its hosting:
- You can set license in host start event if it is hosted on custom ServiceHost.
- If it is IIS then license can be set in Global.asax

Please verify the proper license settings and if you still face any issue, please share your environment details with us, so that we can try to replicate the scenario in our environment and address it accordingly. We are sorry for the inconvenience.


Best Regards,

Thanks for quick reply, I confirm my license is still valid.


There is only one client face this problem, is it restart the computer can fix the issue?

Hi Edie,


Thanks for your feedback.

echu:
is it restart the computer can fix the issue?

As shared earlier, issue may be related with the license settings style. We will really appreciate if you please share environment details (i.e OS Version, Application Type, Target Framework) along with the information regarding how you are setting license, so that we can share some useful information accordingly. We are sorry for the inconvenience.


Best Regards,